Merge branch 'debowerify' into 5.4-rc

This commit is contained in:
yflory 2023-06-30 11:33:49 +02:00
commit eeed65b4ff
201 changed files with 1550 additions and 493 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
datastore
tasks
www/components/*
www/bower_components/*
www/accounts
node_modules

View File

@ -1,57 +0,0 @@
{
"name": "cryptpad",
"version": "0.1.0",
"authors": [
"Caleb James DeLisle <cjd@cjdns.fr>"
],
"description": "realtime collaborative visual editor with zero knowlege server",
"main": "www/index.html",
"moduleType": [
"node"
],
"license": "AGPLv3",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "3.6.0",
"tweetnacl": "0.12.2",
"components-font-awesome": "^4.6.3",
"ckeditor": "4.14.0",
"codemirror": "^5.19.0",
"requirejs": "2.3.5",
"marked": "1.1.0",
"rangy": "rangy-release#~1.3.0",
"json.sortify": "~2.1.0",
"hyperjson": "~1.4.0",
"chainpad-crypto": "^0.2.0",
"chainpad-listmap": "^1.0.0",
"chainpad": "^5.2.0",
"file-saver": "1.3.1",
"alertifyjs": "1.0.11",
"scrypt-async": "1.2.0",
"require-css": "0.1.10",
"bootstrap": "^v4.0.0",
"diff-dom": "2.1.1",
"nthen": "0.1.7",
"open-sans-fontface": "^1.4.2",
"bootstrap-tokenfield": "0.12.1",
"localforage": "^1.5.2",
"html2canvas": "^0.4.1",
"croppie": "^2.5.0",
"sortablejs": "^1.6.0",
"saferphore": "^0.0.1",
"jszip": "3.7.1",
"requirejs-plugins": "^1.0.3",
"dragula.js": "3.7.2",
"MathJax": "3.0.5"
},
"resolutions": {
"bootstrap": "^v4.0.0",
"jquery": "3.6.0"
}
}

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript>

View File

@ -6,7 +6,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/four-oh-four.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript>

View File

@ -62,7 +62,7 @@ CKEDITOR.editorConfig = function( config ) {
// every part of ckeditor will get in the browser cache.
var fix = function (x) {
if (x.map) { return x.map(fix); }
return (/\/bower_components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
return (/\/components\/.*\.css$/.test(x)) ? (x + '?ver=' + CKEDITOR.timestamp) : x;
};
CKEDITOR.tools._buildStyleHtml = CKEDITOR.tools.buildStyleHtml;
CKEDITOR.document._appendStyleSheet = CKEDITOR.document.appendStyleSheet;

View File

@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>

View File

@ -1,5 +1,5 @@
define([
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
], function (ChainPad) {
var Diff = ChainPad.Diff;

View File

@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>

View File

@ -1,6 +1,6 @@
/* Open Sans @font-face kit */
@OpenSansPath: "/bower_components/open-sans-fontface/fonts";
@OpenSansPath: "/components/open-sans-fontface/fonts";
/* BEGIN Light */
@font-face {

View File

@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>

View File

@ -1,23 +1,23 @@
define([
'jquery',
'chainpad-listmap',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/common-util.js',
'/common/outer/network-config.js',
'/common/common-credential.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
'/common/common-realtime.js',
'/common/common-constants.js',
'/common/common-interface.js',
'/common/common-feedback.js',
'/common/outer/local-store.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/outer/login-block.js',
'/common/common-hash.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/bower_components/scrypt-async/scrypt-async.min.js', // better load speed
'/components/tweetnacl/nacl-fast.min.js',
'/components/scrypt-async/scrypt-async.min.js', // better load speed
], function ($, Listmap, Crypto, Util, NetConfig, Cred, ChainPad, Realtime, Constants, UI,
Feedback, LocalStore, Messages, nThen, Block, Hash) {
var Exports = {

View File

@ -6,11 +6,11 @@
#cp-loading {
@font-face {
font-family: 'Open Sans';
src: url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot');
src: url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.woff') format('woff'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.ttf') format('truetype'),
url('/bower_components/open-sans-fontface/fonts/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
src: url('/components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot');
src: url('/components/open-sans-fontface/fonts/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('/components/open-sans-fontface/fonts/Regular/OpenSans-Regular.woff') format('woff'),
url('/components/open-sans-fontface/fonts/Regular/OpenSans-Regular.ttf') format('truetype'),
url('/components/open-sans-fontface/fonts/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
font-weight: normal;
font-style: normal;
}

View File

@ -8,7 +8,7 @@
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/customize/template.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>

View File

@ -2,9 +2,9 @@ define([
'jquery',
'/common/hyperscript.js',
'/customize/pages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
], function ($, h, Pages, nThen) {
// we consider that there is no valid reason to load any of the info pages
// in an iframe. abort everything if you detect that you are embedded.
@ -42,7 +42,7 @@ $(function () {
}).nThen(function () {
require([
'less!/customize/src/less2/pages/page-' + pageName + '.less',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/customize/fonts/cptools/style.css'
], function () {
var $main = $(infoPage());

1140
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,7 @@
"express": "~4.18.2",
"fs-extra": "^7.0.0",
"get-folder-size": "^2.0.1",
"netflux-websocket": "^0.1.20",
"netflux-websocket": "^1.0.0",
"nthen": "0.1.8",
"prompt-confirm": "^2.0.4",
"pull-stream": "^3.6.1",
@ -27,7 +27,34 @@
"stream-to-pull-stream": "^1.7.2",
"tweetnacl": "~0.12.2",
"ulimit": "0.0.2",
"ws": "^3.3.1"
"ws": "^3.3.1",
"alertify.js": "1.0.11",
"bootstrap": "^4.0.0",
"bootstrap-tokenfield": "^0.12.0",
"chainpad": "^5.2.6",
"chainpad-listmap": "^1.0.0",
"chainpad-netflux": "^1.0.0",
"ckeditor": "^4.12.1",
"codemirror": "^5.19.0",
"components-font-awesome": "^4.6.3",
"croppie": "^2.5.0",
"file-saver": "1.3.1",
"hyper-json": "~1.4.0",
"jquery": "3.6.0",
"json.sortify": "~2.1.0",
"jszip": "3.10.1",
"dragula": "3.7.2",
"html2canvas": "^1.4.0",
"localforage": "^1.5.2",
"marked": "^4.3.0",
"mathjax": "3.0.5",
"open-sans-fontface": "^1.4.0",
"require-css": "0.1.10",
"requirejs": "2.3.5",
"requirejs-plugins": "^1.0.2",
"scrypt-async": "1.2.0",
"sortablejs": "^1.6.0"
},
"devDependencies": {
"jshint": "^2.13.4",
@ -35,9 +62,13 @@
},
"overrides": {
"glob-parent": "5.1.2",
"set-value": "4.0.1"
"set-value": "4.0.1",
"minimist": "~1.2.3",
"minimatch": "~3.1.2",
"jquery": "3.6.0"
},
"scripts": {
"install:components": "node scripts/copy-components.js",
"start": "node server.js",
"dev": "DEV=1 node server.js",
"fresh": "FRESH=1 node server.js",

View File

@ -0,0 +1,47 @@
const Fs = require("fs");
const Fse = require("fs-extra");
const Path = require("path");
const componentsPath = Path.join("www", "components");
const oldComponentsPath = Path.join("www", "bower_components");
Fse.mkdirpSync(componentsPath);
Fse.rmSync(oldComponentsPath, { recursive: true, force: true });
[
"alertify.js",
"bootstrap",
"bootstrap-tokenfield",
"chainpad",
"chainpad-listmap",
"chainpad-netflux",
"ckeditor",
"codemirror",
"components-font-awesome",
"croppie",
"file-saver",
"hyper-json",
"jquery",
"json.sortify",
"jszip",
"dragula",
"html2canvas",
"localforage",
"marked",
"mathjax",
"open-sans-fontface",
"tweetnacl",
"require-css",
"requirejs",
"requirejs-plugins",
"scrypt-async",
"sortablejs",
// both client and server:
"chainpad-crypto",
"saferphore",
"nthen",
"netflux-websocket",
].forEach(l => {
const source = Path.join("node_modules", l);
const destination = Path.join(componentsPath, l);
Fs.cpSync(source, destination, { recursive: true });
});

View File

@ -2,9 +2,8 @@
// This file is for automated testing, it should probably not be invoked for any other purpose.
// It will:
// 1. npm install
// 2. bower install
// 3. launch the server
// 4. run the tests on the machine
// 2. launch the server
// 3. run the tests on the machine
const Spawn = require('child_process').spawn;
const processes = [];
@ -74,8 +73,6 @@ run('npm', ['install'], () => {
run('bash', ['-c', 'caffeinate -u -t 2'], waitFor());
}
}).nThen((waitFor) => {
run('bower', ['install'], waitFor());
}).nThen((waitFor) => {
run('npm', ['run', 'fresh'], ()=>{});
run('node', ['./scripts/TestSelenium.js'], waitFor());

View File

@ -2,7 +2,7 @@
var Client = require("../../lib/client");
var Nacl = require("tweetnacl/nacl-fast");
var nThen = require("nthen");
var CPNetflux = require("../../www/bower_components/chainpad-netflux/chainpad-netflux");
var CPNetflux = require("../../www/components/chainpad-netflux/chainpad-netflux");
var Hash = require("../../www/common/common-hash");
var Rpc = require("../../www/common/rpc");
var HK = require("../../lib/hk-util");

View File

@ -1,14 +1,14 @@
/* globals process */
var Client = require("../../lib/client/");
var Crypto = require("../../www/bower_components/chainpad-crypto");
var Crypto = require("../../www/components/chainpad-crypto");
var Mailbox = Crypto.Mailbox;
var Nacl = require("tweetnacl/nacl-fast");
var nThen = require("nthen");
var Pinpad = require("../../www/common/pinpad");
var Rpc = require("../../www/common/rpc");
var Hash = require("../../www/common/common-hash");
var CpNetflux = require("../../www/bower_components/chainpad-netflux");
var CpNetflux = require("../../www/components/chainpad-netflux");
var Util = require("../../lib/common-util");
// you need more than 100 messages in the history, and you need a lastKnownHash between "50" and "length - 50"

View File

@ -1,14 +1,14 @@
/* globals process */
var Client = require("../../lib/client/");
var Crypto = require("../../www/bower_components/chainpad-crypto");
var Crypto = require("../../www/components/chainpad-crypto");
var Mailbox = Crypto.Mailbox;
var Nacl = require("tweetnacl/nacl-fast");
var nThen = require("nthen");
var Pinpad = require("../../www/common/pinpad");
var Rpc = require("../../www/common/rpc");
var Hash = require("../../www/common/common-hash");
var CpNetflux = require("../../www/bower_components/chainpad-netflux");
var CpNetflux = require("../../www/components/chainpad-netflux");
var Roster = require("./roster");
var Util = require("../../lib/common-util");

View File

@ -7,7 +7,7 @@
<meta name="referrer" content="no-referrer" />
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
<link href="/customize/src/outer.css?ver=1.3.2" rel="stylesheet" type="text/css">
</head>
<body>

View File

@ -4,7 +4,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/admin/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/admin/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/components/requirejs/require.js?ver=2.3.5"></script>
<style>
.loading-hidden { display: none; }
</style>

View File

@ -2,9 +2,9 @@ define([
'jquery',
'/api/config',
'/customize/application_config.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/toolbar.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common.js',
'/common/hyperscript.js',
'/customize/messages.js',
@ -17,11 +17,11 @@ define([
'/common/clipboard.js',
'/lib/datepicker/flatpickr.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
'css!/lib/datepicker/flatpickr.min.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/admin/app-admin.less',
], function (
$,

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'/common/dom-ready.js',
'/common/sframe-common-outer.js',

View File

@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<script data-bootload="main.js" data-main="/common/boot.js" src="/components/requirejs/require.js"></script>
<style>
.report {

View File

@ -1,6 +1,6 @@
define([
'jquery',
'/bower_components/hyperjson/hyperjson.js',
'/components/hyper-json/hyperjson.js',
'json.sortify',
'/drive/tests.js',
//'/common/test.js',
@ -16,7 +16,7 @@ define([
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
'less!/customize/src/less2/pages/page-assert.less',
], function ($, Hyperjson, Sortify, Drive, /*Test,*/ Hash, Util, Thumb, Wire, Flat, MediaTag, Block, ApiConfig, Assertions, h, Messages) {
window.Hyperjson = Hyperjson;

View File

@ -5,7 +5,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" type="image/png" href="/customize/favicon/main-favicon.png" id="favicon"/>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="html">
<noscript></noscript>

View File

@ -7,7 +7,7 @@
<meta name="referrer" content="no-referrer" />
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="main.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
<link href="/customize/src/outer.css?ver=1.3.2" rel="stylesheet" type="text/css">
</head>
<body>

View File

@ -4,7 +4,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/calendar/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/calendar/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/components/requirejs/require.js?ver=2.3.5"></script>
<style>
.loading-hidden { display: none; }
</style>

View File

@ -1,9 +1,9 @@
define([
'jquery',
'json.sortify',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/toolbar.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-util.js',
'/common/common-hash.js',
@ -25,10 +25,10 @@ define([
'/common/inner/properties.js',
'/common/jscolor.js',
'/bower_components/file-saver/FileSaver.min.js',
'/components/file-saver/FileSaver.min.js',
'css!/lib/calendar/tui-calendar.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'less!/calendar/app-calendar.less',
], function (
$,

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'/common/dom-ready.js',
'/common/sframe-common-outer.js',

View File

@ -22,16 +22,15 @@
if (/\/api\/.*/.test(src)) {
console.error("A serverside API endpoint could not be reached.", src);
// don't warn about bower if the error is the optional instance endpoint
// don't warn about missing components if the error is the optional instance endpoint
if (/\/api\/instance/.test(src)) { return; }
}
//if (!/\/bower_components\/.*/.test(src)) { return; }
//if (!/\/components\/.*/.test(src)) { return; }
if (first) {
document.body.appendChild(h('h1', ['Oops!']));
document.body.appendChild(h('p', [
`It's possible that this server's administrators forgot to install its client-side dependencies with 'bower update',`,
` or that some other required resource couldn't be loaded.`,
`It's possible that required resource couldn't be loaded.`,
` See your browser's console for more details.`,
]));
first = false;

View File

@ -9,5 +9,5 @@
<div id="cp-progress"></div>
<iframe-placeholder>
<script type="text/javascript" src="/checkup/dependency-warning.js?ver=1.0.1"></script>
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<script data-bootload="main.js" data-main="/common/boot.js" src="/components/requirejs/require.js"></script>

View File

@ -2,7 +2,7 @@
<html class="cp-app-noscroll cp-app-print">
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script async data-bootload="/checkup/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/checkup/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/components/requirejs/require.js?ver=2.3.5"></script>
</head>
<body class="cp-app-checkup">
</body>

View File

@ -5,7 +5,7 @@ define([
'/common/hyperscript.js',
'/customize/messages.js',
'/common/dom-ready.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common-outer.js',
'/customize/login.js',
'/common/common-hash.js',
@ -16,8 +16,8 @@ define([
'/checkup/checkup-tools.js',
'/customize/application_config.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'/components/tweetnacl/nacl-fast.min.js',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/checkup/app-checkup.less',
], function ($, ApiConfig, Assertions, h, Messages, DomReady,
nThen, SFCommonO, Login, Hash, Util, Pinpad,

View File

@ -3,7 +3,7 @@
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<script data-bootload="main.js" data-main="/common/boot.js" src="/components/requirejs/require.js"></script>
</head>
<body>
<div id="cp-progress"></div>

View File

@ -3,8 +3,8 @@ define([
'/common/common-util.js',
'/checkup/checkup-tools.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'/components/tweetnacl/nacl-fast.min.js',
'css!/components/components-font-awesome/css/font-awesome.min.css',
'less!/checkup/app-checkup.less',
], function ($, Util, Tools) {
var postMessage = function (content) {

View File

@ -7,7 +7,7 @@
<meta name="referrer" content="no-referrer" />
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/common/sframe-app-outer.js" data-main="/common/boot.js?ver=1.0" src="/components/requirejs/require.js?ver=2.3.5"></script>
<link href="/customize/src/outer.css?ver=1.3.2" rel="stylesheet" type="text/css">
</head>
<body>

View File

@ -4,7 +4,7 @@
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<script src="/customize/pre-loading.js?ver=1.1"></script>
<link href="/customize/src/pre-loading.css?ver=1.0" rel="stylesheet" type="text/css">
<script async data-bootload="/code/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/bower_components/requirejs/require.js?ver=2.3.5"></script>
<script async data-bootload="/code/inner.js" data-main="/common/sframe-boot.js?ver=1.11" src="/components/requirejs/require.js?ver=2.3.5"></script>
<style>
.loading-hidden { display: none; }
#editor1 { display: none; }

View File

@ -1,7 +1,7 @@
define([
'jquery',
'/common/diffMarked.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common.js',
'/common/hyperscript.js',
'/common/sframe-app-framework.js',

View File

@ -2,7 +2,7 @@ define([
'/common/common-util.js',
'/common/sframe-common-codemirror.js',
'/customize/messages.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
'/common/inner/common-mediatag.js',
'/common/common-interface.js',
], function (Util, SFCodeMirror, Messages, ChainPad, MT, UI) {

View File

@ -5,7 +5,7 @@ const require = define;
*/
define([
'/api/config',
'/bower_components/nthen/index.js'
'/components/nthen/index.js'
], function (Config, nThen) { /*::});module.exports = (function() {
const Config = (undefined:any);
const nThen = (undefined:any);

View File

@ -78,7 +78,7 @@ define([
window.onerror = function (e) {
if (/requirejs\.org/.test(e)) {
console.log();
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `bower install && bower update` to get the latest code, then modify their cache version.\nBest of luck,\nThe CryptPad Developers");
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `npm install && npm run install:components` to get the latest code.\nBest of luck,\nThe CryptPad Developers");
return void console.log();
}
if (window.CryptPad_loadingError) {

View File

@ -88,12 +88,12 @@ var factory = function (AppConfig, Scrypt) {
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = factory(
{}, //require("../../customize.dist/application_config.js"),
require("../bower_components/scrypt-async/scrypt-async.min.js")
require("../components/scrypt-async/scrypt-async.min.js")
);
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/customize/application_config.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
'/components/scrypt-async/scrypt-async.min.js',
], function (AppConfig) {
return factory(AppConfig, window.scrypt);
});

View File

@ -750,9 +750,9 @@ Version 4: Data URL when not a realtime link yet (new pad or "static" app)
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/common/common-util.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/common-signing-keys.js',
'/bower_components/tweetnacl/nacl-fast.min.js'
'/components/tweetnacl/nacl-fast.min.js'
], function (Util, Crypto, Keys) {
return factory(Util, Crypto, Keys, window.nacl);
});

View File

@ -14,14 +14,14 @@ define([
'/common/common-hash.js',
'/common/common-notifier.js',
'/customize/application_config.js',
'/bower_components/alertifyjs/dist/js/alertify.js',
'/components/alertify.js/dist/js/alertify.js',
'/lib/tippy/tippy.min.js',
'/common/hyperscript.js',
'/customize/loading.js',
//'/common/test.js',
'/lib/jquery-ui/jquery-ui.min.js', // autocomplete widget
'/bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js',
'/components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js',
'css!/lib/tippy/tippy.css',
'css!/lib/jquery-ui/jquery-ui.min.css'
], function ($, Messages, Util, Hash, Notifier, AppConfig,

View File

@ -1,5 +1,5 @@
define([
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/common-hash.js',
'/common/common-util.js',
'/common/common-constants.js',

View File

@ -4,7 +4,7 @@ define([
'/common/visible.js',
'/common/common-hash.js',
'/common/media-tag.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
], function ($, Util, Visible, Hash, MediaTag) {
var Nacl = window.nacl;
var Thumb = {
@ -239,7 +239,7 @@ define([
});
};
if (window.html2canvas) { return void todo(); }
require(['/bower_components/html2canvas/build/html2canvas.min.js'], todo);
require(['/components/html2canvas/build/html2canvas.min.js'], todo);
};
Thumb.initPadThumbnails = function (common, opts) {

View File

@ -13,7 +13,7 @@ define([
'/customize/messages.js',
'/customize/application_config.js',
'/customize/pages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/inner/invitation.js',
'/common/visible.js',

View File

@ -1,5 +1,5 @@
define([
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'chainpad-netflux',
'netflux-client',
'/common/common-util.js',
@ -8,8 +8,8 @@ define([
'/common/outer/network-config.js',
'/common/outer/cache-store.js',
'/common/pinpad.js',
'/bower_components/nthen/index.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/nthen/index.js',
'/components/chainpad/chainpad.dist.js',
], function (Crypto, CPNetflux, Netflux, Util, Hash, Realtime, NetConfig, Cache, Pinpad, nThen) {
var finish = function (S, err, doc) {
if (S.done) { return; }

View File

@ -14,7 +14,7 @@ define([
'/common/outer/login-block.js',
'/customize/application_config.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function (Config, Messages, Util, Hash, Cache,
Messaging, Constants, Feedback, Visible, UserObject, LocalStore, Channel, Block,
AppConfig, Nthen) {
@ -221,7 +221,7 @@ define([
n = n(function (waitFor) {
require([
'/api/broadcast?'+ (+new Date()),
'/bower_components/tweetnacl/nacl-fast.min.js'
'/components/tweetnacl/nacl-fast.min.js'
], waitFor(function (Broadcast) {
nacl = window.nacl;
theirs = nacl.util.decodeBase64(Broadcast.curvePublic);
@ -1563,7 +1563,7 @@ define([
'/file/file-crypto.js',
'/common/media-tag.js',
'/common/outer/upload.js',
'/bower_components/tweetnacl/nacl-fast.min.js'
'/components/tweetnacl/nacl-fast.min.js'
], waitFor(function (_FileCrypto, _MT, _Upload) {
FileCrypto = _FileCrypto;
MediaTag = _MT;
@ -1704,7 +1704,7 @@ define([
require([
'/common/cryptget.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
], waitFor(function (_Crypt, _Crypto) {
Crypt = _Crypt;
Crypto = _Crypto;

View File

@ -1,6 +1,6 @@
define([
'/common/cursor-treesome.js',
'/bower_components/rangy/rangy-core.min.js'
'/lib/rangy/rangy-core.min.js'
], function (Tree, Rangy) {
var verbose = function (x) { if (window.verboseMode) { console.log(x); } };

View File

@ -1,7 +1,7 @@
define([
'jquery',
'/api/config',
'/bower_components/marked/marked.min.js',
'/components/marked/marked.min.js',
'/common/common-hash.js',
'/common/common-util.js',
'/common/hyperscript.js',
@ -13,7 +13,7 @@ define([
'/lib/highlight/highlight.pack.js',
'/lib/diff-dom/diffDOM.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
'css!/lib/highlight/styles/'+ (window.CryptPad_theme === 'dark' ? 'dark.css' : 'github.css')
],function ($, ApiConfig, Marked, Hash, Util, h, MT, MediaTag, Messages, Less, Pages) {
var DiffMd = {};
@ -57,7 +57,7 @@ define([
__stubbed: true,
tex2svg: function (a, b) {
require([
'/bower_components/MathJax/es5/tex-svg.js',
'/components/mathjax/es5/tex-svg.js',
], function () {
console.debug("Loaded mathjax");
if (Mathjax.__stubbed) {
@ -180,7 +180,7 @@ define([
renderer: restrictedMd ? restrictedRenderer : renderer,
});
noHeadingId = noId;
var r = Marked(md, {
var r = Marked.parse(md, {
sanitize: sanitize,
headerIds: !noId,
gfm: true,

View File

@ -14,7 +14,7 @@ define([
'/common/inner/access.js',
'/common/inner/properties.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/hyperscript.js',
'/common/proxy-manager.js',
'/customize/application_config.js',

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<head>
<title>About our feedback api</title>
<script data-bootload="feedback-main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
<script data-bootload="feedback-main.js" data-main="/common/boot.js" src="/components/requirejs/require.js"></script>
<style>
body {
max-width: 60vw;

View File

@ -7,7 +7,7 @@ define([
'/common/inner/common-modal.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function ($, Util, Hash, UI, UIElements, Modal, h,
Messages, nThen) {
var Access = {};

View File

@ -8,10 +8,10 @@ define([
'/customize/messages.js',
'/customize/application_config.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/bower_components/croppie/croppie.min.js',
'/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/croppie/croppie.css',
'/components/tweetnacl/nacl-fast.min.js',
'/components/croppie/croppie.min.js',
'/components/file-saver/FileSaver.min.js',
'css!/components/croppie/croppie.css',
], function ($, Util, Hash, UI, h, MediaTag, Messages, AppConfig) {
var MT = {};

View File

@ -5,7 +5,7 @@ define([
'/common/common-interface.js',
'/common/common-ui-elements.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function ($, Util, Hash, UI, UIElements, Messages, nThen) {
var Modal = {};

View File

@ -45,8 +45,8 @@ var factory = function (Util, Nacl, Scrypt) {
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/common/common-util.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
'/components/tweetnacl/nacl-fast.min.js',
'/components/scrypt-async/scrypt-async.min.js',
], function (Util) {
return factory(Util, window.nacl, window.scrypt);
});

View File

@ -7,7 +7,7 @@ define([
'/common/inner/common-modal.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function ($, Util, Hash, UI, UIElements, Modal, h,
Messages, nThen) {
var Properties = {};

View File

@ -10,7 +10,7 @@ define([
'/common/hyperscript.js',
'/common/clipboard.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/customize/pages.js',
], function ($, ApiConfig, Util, Hash, UI, UIElements, Feedback, Modal, h, Clipboard,
Messages, nThen, Pages) {

View File

@ -3,8 +3,8 @@ define([
'/common/common-interface.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/nthen/index.js',
'/components/chainpad/chainpad.dist.js',
], function ($, UI, h, Messages, nThen, ChainPad /* JsonOT */) {
var Snapshots = {};

View File

@ -8,9 +8,9 @@ define([
'/common/common-feedback.js',
'/common/inner/cache.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/bower_components/saferphore/index.js',
'/bower_components/jszip/dist/jszip.min.js',
'/components/nthen/index.js',
'/components/saferphore/index.js',
'/components/jszip/dist/jszip.min.js',
], function ($, FileCrypto, Hash, Util, UI, h, Feedback,
Cache, Messages, nThen, Saferphore, JsZip) {
var saveAs = window.saveAs;

View File

@ -8,8 +8,8 @@ define([
'/common/outer/mailbox.js',
'/customize/messages.js',
'/common/common-realtime.js',
'/bower_components/nthen/index.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/nthen/index.js',
'/components/chainpad-crypto/crypto.js',
], function (AppConfig, Feedback, Hash, Util, Messaging, Crypt, Mailbox, Messages, Realtime, nThen, Crypto) {
// Start migration check
// Versions:

View File

@ -2,7 +2,7 @@ define([
'jquery',
'/common/toolbar.js',
'json.sortify',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-interface.js',
'/common/common-hash.js',
@ -13,7 +13,7 @@ define([
'/api/config',
'/customize/messages.js',
'/customize/application_config.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
'/file/file-crypto.js',
'/common/onlyoffice/history.js',
'/common/onlyoffice/oocell_base.js',
@ -22,10 +22,10 @@ define([
'/common/outer/worker-channel.js',
'/common/outer/x2t.js',
'/bower_components/file-saver/FileSaver.min.js',
'/components/file-saver/FileSaver.min.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'less!/bower_components/components-font-awesome/css/font-awesome.min.css',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'less!/components/components-font-awesome/css/font-awesome.min.css',
'less!/common/onlyoffice/app-oo.less',
], function (
$,
@ -2623,7 +2623,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
name: 'dlmedias',
icon: 'fa-download',
}, function () {
require(['/bower_components/jszip/dist/jszip.min.js'], function (JsZip) {
require(['/components/jszip/dist/jszip.min.js'], function (JsZip) {
var zip = new JsZip();
Object.keys(mediasData || {}).forEach(function (url) {
var obj = mediasData[url];

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'/common/dom-ready.js',
'/common/common-hash.js',

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'jquery',
'/common/requireconfig.js',

View File

@ -24,13 +24,13 @@ define([
'/common/outer/network-config.js',
'/customize/application_config.js',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad-crypto/crypto.js',
'/components/chainpad/chainpad.dist.js',
'chainpad-netflux',
'chainpad-listmap',
'netflux-client',
'/bower_components/nthen/index.js',
'/bower_components/saferphore/index.js',
'/components/nthen/index.js',
'/components/saferphore/index.js',
], function (ApiConfig, Sortify, UserObject, ProxyManager, Migrate, Hash, Util, Constants, Feedback,
Realtime, Messaging, Pinpad, Cache,
SF, Cursor, OnlyOffice, Mailbox, Profile, Team, Messenger, History,

View File

@ -1,6 +1,6 @@
define([
'/common/common-util.js',
'/bower_components/localforage/dist/localforage.min.js',
'/components/localforage/dist/localforage.min.js',
], function (Util, localForage) {
var S = window.CryptPad_Cache = {};
var onReady = Util.mkEvent(true);

View File

@ -6,11 +6,11 @@ define([
'/common/outer/cache-store.js',
'/calendar/recurrence.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'chainpad-listmap',
'/lib/datepicker/flatpickr.js',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad-crypto/crypto.js',
'/components/chainpad/chainpad.dist.js',
], function (Util, Hash, Constants, Realtime, Cache, Rec, Messages, nThen, Listmap, FP, Crypto, ChainPad) {
var Calendar = {};

View File

@ -3,7 +3,7 @@ define([
'/common/common-constants.js',
'/customize/messages.js',
'/customize/application_config.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
], function (Util, Constants, Messages, AppConfig, Crypto) {
var Cursor = {};

View File

@ -2,7 +2,7 @@ define([
'/common/common-util.js',
'/common/common-hash.js',
'/common/userObject.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function (Util, Hash, UserObject, nThen) {
var History = {};
var commands = {};

View File

@ -109,8 +109,8 @@ var factory = function (Util, Cred, Nacl, Crypto) {
define([
'/common/common-util.js',
'/common/common-credential.js',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/chainpad-crypto/crypto.js',
'/components/tweetnacl/nacl-fast.min.js',
], function (Util, Cred, Crypto) {
return factory(Util, Cred, window.nacl, Crypto);
});

View File

@ -2,7 +2,7 @@ define([
'/common/common-constants.js',
'/common/common-hash.js',
'/common/outer/cache-store.js',
'/bower_components/localforage/dist/localforage.min.js',
'/components/localforage/dist/localforage.min.js',
'/customize/application_config.js',
'/common/common-util.js',
], function (Constants, Hash, Cache, localForage, AppConfig, Util) {

View File

@ -1,7 +1,7 @@
define([
'/common/common-util.js',
'/api/config',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
], function (Util, ApiConfig) {
var Nacl = window.nacl;

View File

@ -2,7 +2,7 @@ define([
'/common/common-messaging.js',
'/common/common-hash.js',
'/common/common-util.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
], function (Messaging, Hash, Util, Crypto) {
// Random timeout between 10 and 30 times your sync time (lag + chainpad sync)

View File

@ -8,7 +8,7 @@ define([
'/common/notify.js',
'/common/outer/mailbox-handlers.js',
'chainpad-netflux',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
], function (Config, BCast, Util, Hash, Realtime, Messaging, Notify, Handlers, CpNetflux, Crypto) {
var Mailbox = {};

View File

@ -1,5 +1,5 @@
define([
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/common-hash.js',
'/common/common-util.js',
'/common/common-realtime.js',
@ -8,7 +8,7 @@ define([
'/customize/messages.js',
'/customize/application_config.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function (Crypto, Hash, Util, Realtime, Messaging, Constants, Messages, AppConfig, nThen) {
'use strict';
var Curve = Crypto.Curve;

View File

@ -4,8 +4,8 @@ define([
'/common/common-constants.js',
'/common/common-realtime.js',
'chainpad-listmap',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad-crypto/crypto.js',
'/components/chainpad/chainpad.dist.js',
], function (Util, Hash, Constants, Realtime, Listmap, Crypto, ChainPad) {
var Profile = {};

View File

@ -919,23 +919,23 @@ var factory = function (Util, Hash, CPNetflux, Sortify, nThen, Crypto, Feedback)
module.exports = factory(
require("../common-util"),
require("../common-hash"),
require("../../bower_components/chainpad-netflux/chainpad-netflux.js"),
require("../../bower_components/json.sortify"),
require("../../components/chainpad-netflux/chainpad-netflux.js"),
require("../../components/json.sortify"),
require("nthen"),
require("../../bower_components/chainpad-crypto/crypto"),
require("../../components/chainpad-crypto/crypto"),
null // no feedback here
);
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
require.config({ paths: { 'json.sortify': '/bower_components/json.sortify/dist/JSON.sortify' } });
require.config({ paths: { 'json.sortify': '/components/json.sortify/dist/JSON.sortify' } });
define([
'/common/common-util.js',
'/common/common-hash.js',
'chainpad-netflux',
'json.sortify',
'/bower_components/nthen/index.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/nthen/index.js',
'/components/chainpad-crypto/crypto.js',
'/common/common-feedback.js',
//'/bower_components/tweetnacl/nacl-fast.min.js',
//'/components/tweetnacl/nacl-fast.min.js',
], function (Util, Hash, CPNF, Sortify, nThen, Crypto, Feedback) {
return factory.apply(null, [
Util,

View File

@ -1,5 +1,5 @@
/* jshint ignore:start */
importScripts('/bower_components/requirejs/require.js');
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {

View File

@ -4,10 +4,10 @@ define([
'/common/userObject.js',
'/common/outer/cache-store.js',
'/bower_components/nthen/index.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/nthen/index.js',
'/components/chainpad-crypto/crypto.js',
'chainpad-listmap',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
], function (Hash, Util, UserObject, Cache,
nThen, Crypto, Listmap, ChainPad) {
var SF = {};

View File

@ -1,5 +1,5 @@
/* jshint ignore:start */
importScripts('/bower_components/requirejs/require.js');
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {

View File

@ -15,12 +15,12 @@ define([
'/common/outer/cache-store.js',
'chainpad-listmap',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'chainpad-netflux',
'/bower_components/chainpad/chainpad.dist.js',
'/bower_components/nthen/index.js',
'/bower_components/saferphore/index.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/chainpad/chainpad.dist.js',
'/components/nthen/index.js',
'/components/saferphore/index.js',
'/components/tweetnacl/nacl-fast.min.js',
], function (Util, Hash, Constants, Realtime,
ProxyManager, UserObject, SF, Roster, Messaging, Feedback, Invite, Crypt, Cache,
Listmap, Crypto, CpNetflux, ChainPad, nThen, Saferphore) {

View File

@ -3,8 +3,8 @@ define([
'/common/common-hash.js',
'/common/common-util.js',
'/common/outer/cache-store.js',
'/bower_components/nthen/index.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/nthen/index.js',
'/components/tweetnacl/nacl-fast.min.js',
], function (FileCrypto, Hash, Util, Cache, nThen) {
var Nacl = window.nacl;
var module = {};

View File

@ -1,5 +1,5 @@
/* jshint ignore:start */
importScripts('/bower_components/requirejs/require.js');
importScripts('/components/requirejs/require.js');
window = self;
localStorage = {

View File

@ -1,6 +1,6 @@
define([
'/api/config',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/common-util.js',
], function (ApiConfig, nThen, Util) {
var X2T = {};

View File

@ -5,7 +5,7 @@ define([
'/common/outer/sharedfolder.js',
'/customize/messages.js',
'/common/common-feedback.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
], function (UserObject, Util, Hash, SF, Messages, Feedback, nThen) {

View File

@ -4,30 +4,31 @@ define([
var out = {
// fix up locations so that relative urls work.
baseUrl: window.location.pathname,
paths: {
paths: {
// json plugin
text: '/bower_components/requirejs-plugins/lib/text',
json: '/bower_components/requirejs-plugins/src/json',
text: '/components/requirejs-plugins/lib/text',
json: '/components/requirejs-plugins/src/json',
optional: '/lib/optional/optional',
// jquery declares itself as literally "jquery" so it cannot be pulled by path :(
"jquery": "/bower_components/jquery/dist/jquery.min",
"jquery": "/components/jquery/dist/jquery.min",
"mermaid": "/lib/mermaid/mermaid.min",
// json.sortify same
"json.sortify": "/bower_components/json.sortify/dist/JSON.sortify",
cm: '/bower_components/codemirror',
"json.sortify": "/components/json.sortify/dist/JSON.sortify",
cm: '/components/codemirror',
'tui-code-snippet': '/lib/calendar/tui-code-snippet.min',
'tui-date-picker': '/lib/calendar/date-picker',
'netflux-client': '/bower_components/netflux-websocket/netflux-client',
'chainpad-netflux': '/bower_components/chainpad-netflux/chainpad-netflux',
'chainpad-listmap': '/bower_components/chainpad-listmap/chainpad-listmap',
'netflux-client': '/components/netflux-websocket/netflux-client',
'chainpad-netflux': '/components/chainpad-netflux/chainpad-netflux',
'chainpad-listmap': '/components/chainpad-listmap/chainpad-listmap',
'cm-extra': '/lib/codemirror-extra-modes',
// asciidoctor same
'asciidoctor': '/lib/asciidoctor/asciidoctor.min'
},
map: {
'*': {
'css': '/bower_components/require-css/css.js',
'css': '/components/require-css/css.js',
'less': '/common/RequireLess.js',
'/bower_components/tweetnacl/nacl-fast.min.js': '/components/tweetnacl/nacl-fast.min.js'
}
}
};

View File

@ -408,7 +408,7 @@ var factory = function (Util, Nacl) {
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/common/common-util.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/tweetnacl/nacl-fast.min.js',
], function (Util) {
return factory(Util, window.nacl);
});

View File

@ -1,9 +1,9 @@
define([
'jquery',
'/bower_components/hyperjson/hyperjson.js',
'/components/hyper-json/hyperjson.js',
'/common/toolbar.js',
'json.sortify',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/sframe-common.js',
'/customize/messages.js',
'/common/hyperscript.js',
@ -15,12 +15,12 @@ define([
'/common/common-feedback.js',
'/common/inner/snapshots.js',
'/customize/application_config.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
'/common/test.js',
'/bower_components/file-saver/FileSaver.min.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'/components/file-saver/FileSaver.min.js',
'css!/components/bootstrap/dist/css/bootstrap.min.css',
'css!/components/components-font-awesome/css/font-awesome.min.css',
], function (
$,
Hyperjson,
@ -840,7 +840,7 @@ define([
try {
l = cpNfInner.chainpad.getLag();
} catch (e) {
throw new Error("ChainPad.getLag() does not exist, please `bower update`");
throw new Error("ChainPad.getLag() does not exist, please `npm install && npm run install:components`");
}
if (l.lag < badStateTimeout) { return; }

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'/common/dom-ready.js',
'/common/sframe-common-outer.js'

View File

@ -34,7 +34,7 @@ define([
window.onerror = function (e) {
if (/requirejs\.org/.test(e)) {
console.log();
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `bower install && bower update` to get the latest code, then modify their cache version.\nBest of luck,\nThe CryptPad Developers");
console.error("Require.js threw a Script Error. This probably means you're missing a dependency for CryptPad.\nIt is recommended that the admin of this server runs `npm install` to get the latest code, then modify their cache version.\nBest of luck,\nThe CryptPad Developers");
return void console.log();
}
if (window.CryptPad_loadingError) {

View File

@ -17,7 +17,7 @@
define([
'/common/common-util.js',
'/customize/application_config.js',
'/bower_components/chainpad/chainpad.dist.js'
'/components/chainpad/chainpad.dist.js'
], function (Util, AppConfig, ChainPad) {
var module = { exports: {} };
@ -88,7 +88,7 @@ define([
try {
l = chainpad.getLag();
} catch (e) {
throw new Error("ChainPad.getLag() does not exist, please `bower update`");
throw new Error("ChainPad.getLag() does not exist, please `npm install && npm run install:components`");
}
if (l.lag < badStateTimeout) { return; }
evInfiniteSpinner.fire();

View File

@ -8,7 +8,7 @@ define([
'/common/common-hash.js',
'/common/common-util.js',
'/common/text-cursor.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
], function ($, Modes, Themes, Messages, UIElements, MT, Hash, Util, TextCursor, ChainPad) {
var module = {};

View File

@ -11,11 +11,11 @@ define([
'/common/hyperscript.js',
'/customize/messages.js',
'/customize/pages.js',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/common/media-tag.js',
'/bower_components/file-saver/FileSaver.min.js',
'/bower_components/tweetnacl/nacl-fast.min.js',
'/components/file-saver/FileSaver.min.js',
'/components/tweetnacl/nacl-fast.min.js',
], function ($, ApiConfig, FileCrypto, MakeBackup, Thumb, UI, UIElements, Util, Hash, h, Messages, Pages, nThen, MT) {
var Nacl = window.nacl;
var module = {};

View File

@ -4,10 +4,10 @@ define([
'/common/common-util.js',
'/common/hyperscript.js',
'/customize/messages.js',
'/bower_components/nthen/index.js',
//'/bower_components/chainpad-json-validator/json-ot.js',
'/components/nthen/index.js',
//'/components/chainpad-json-validator/json-ot.js',
'/bower_components/chainpad/chainpad.dist.js',
'/components/chainpad/chainpad.dist.js',
], function ($, UI, Util, h, Messages, nThen, ChainPad /* JsonOT */) {
//var ChainPad = window.ChainPad;
var History = {};

View File

@ -1,6 +1,6 @@
// Load #1, load as little as possible because we are in a race to get the loading screen up.
define([
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/api/config',
'/common/requireconfig.js',
'/customize/messages.js',
@ -130,7 +130,7 @@ define([
require([
'/common/sframe-chainpad-netflux-outer.js',
'/common/cryptpad-common.js',
'/bower_components/chainpad-crypto/crypto.js',
'/components/chainpad-crypto/crypto.js',
'/common/cryptget.js',
'/common/outer/worker-channel.js',
'/secureiframe/main.js',

View File

@ -1,7 +1,7 @@
define([
'jquery',
'/api/config',
'/bower_components/nthen/index.js',
'/components/nthen/index.js',
'/customize/messages.js',
'/common/sframe-chainpad-netflux-inner.js',
'/common/outer/worker-channel.js',
@ -26,7 +26,7 @@ define([
'/common/common-feedback.js',
'/common/common-language.js',
'/common/common-constants.js',
'/bower_components/localforage/dist/localforage.min.js',
'/components/localforage/dist/localforage.min.js',
'/common/hyperscript.js',
], function (
$,

Some files were not shown because too many files have changed in this diff Show More