@gudhub/core 1.2.4-beta.38 → 1.2.4-beta.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.parcel-cache/61134f48017c9cc1-AssetGraph +0 -0
- package/.parcel-cache/72a0445d2e7372b4-BundleGraph +0 -0
- package/.parcel-cache/83e7562660f7cc15-BundleGraph +0 -0
- package/.parcel-cache/9a0d07555444f4da-AssetGraph +0 -0
- package/.parcel-cache/d3a1b9507cb44047-AssetGraph +0 -0
- package/.parcel-cache/d647b2950bce7da7-RequestGraph +0 -0
- package/.parcel-cache/data.mdb +0 -0
- package/.parcel-cache/dc1da35000e13623-RequestGraph +0 -0
- package/.parcel-cache/lock.mdb +0 -0
- package/.parcel-cache/snapshot-d647b2950bce7da7.txt +28892 -0
- package/.parcel-cache/snapshot-dc1da35000e13623.txt +28882 -0
- package/.parcelrc.appRequestWorker +4 -0
- package/.vscode/launch.json +31 -0
- package/GUDHUB/DataService/IndexedDB/IndexedDBAppService.js +30 -1
- package/GUDHUB/DataService/IndexedDB/appRequestWorker.js +2 -2
- package/GUDHUB/Storage/ModulesList.js +0 -9
- package/GUDHUB/Utils/AppsTemplateService/AppsTemplateService.js +4 -11
- package/GUDHUB/Utils/get_date/get_date.test.js +12 -3
- package/GUDHUB/Utils/nested_list/nested_list.js +50 -53
- package/GUDHUB/Utils/nested_list/nested_list.test.js +2 -140
- package/GUDHUB/gudhub.js +16 -10
- package/GUDHUB/gudhubAppRequestWorker.js +18 -0
- package/build.sh +55 -0
- package/dist/gudhub.es.js +15880 -0
- package/dist/gudhub.umd.js +195 -0
- package/index.js +3 -1
- package/indexUMD.js +0 -2
- package/indextest.html +35 -0
- package/package.json +37 -25
- package/vite.config.esm.js +67 -0
- package/vite.config.umd.js +66 -0
- package/appRequestWorker.js +0 -1
- package/appRequestWorker.js.LICENSE.txt +0 -13
- package/appRequestWorker.js.map +0 -1
- package/umd/appRequestWorker.js +0 -1
- package/umd/library.min.js +0 -1
- package/webpack.config.js +0 -154
package/index.js
CHANGED
package/indexUMD.js
CHANGED
package/indextest.html
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<body>
|
|
4
|
+
|
|
5
|
+
<h1>My First Heading</h1>
|
|
6
|
+
|
|
7
|
+
<p>My first paragraph.</p>
|
|
8
|
+
|
|
9
|
+
<script type="text/javascript" charset="utf-8" src="file:///home/vitaly/Documents/work/gudhubclient/override_npm/gudhub/dist/gudhub.umd.js"></script>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
const auth_key = "6be1AB+4e0iIkuyIXkpeSGbzMVTUkKaBv4Jb8u4w58LFPF5/kzOIfrojilDKbfWhyP+Rb8ik/cCXhd+2/5kigQ==";
|
|
14
|
+
const app_id = 35902;
|
|
15
|
+
|
|
16
|
+
const gudhub = new GudHub(auth_key);
|
|
17
|
+
|
|
18
|
+
// const button = document.querySelector('.button');
|
|
19
|
+
// const output = document.querySelector('h1');
|
|
20
|
+
|
|
21
|
+
// button.addEventListener('click', async () => {
|
|
22
|
+
// const app = await gudhub.getApp(app_id);
|
|
23
|
+
gudhub.getApp(app_id).then((app) => {
|
|
24
|
+
console.log(app);
|
|
25
|
+
const beautifiedApp = JSON.stringify(app.app_name, null, 2);
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
// output.innerHTML = beautifiedApp;
|
|
30
|
+
// });
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
|
package/package.json
CHANGED
|
@@ -1,28 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gudhub/core",
|
|
3
|
-
"version": "1.2.4-beta.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
3
|
+
"version": "1.2.4-beta.42",
|
|
6
4
|
"scripts": {
|
|
7
5
|
"test": "NODE_ENV=test mocha $(find ./GUDHUB -print | grep -i test.js)",
|
|
8
|
-
"prepublishOnly": "
|
|
6
|
+
"prepublishOnly": "chmod +x ./build.sh; ./build.sh",
|
|
9
7
|
"publishPublicly": "npm publish --access public"
|
|
10
8
|
},
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"exclude": [
|
|
20
|
-
"babel-plugin-transform-classes"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
]
|
|
9
|
+
"appRequestWorker": "dist/PARCEL_APP_REQUEST_WORKER_FILENAME.js",
|
|
10
|
+
"main": "./dist/gudhub.umd.js",
|
|
11
|
+
"module": "./dist/gudhub.es.js",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"require": "./dist/gudhub.umd.js",
|
|
15
|
+
"import": "./dist/gudhub.es.js"
|
|
16
|
+
}
|
|
25
17
|
},
|
|
18
|
+
"targets": {
|
|
19
|
+
"appRequestWorker": {
|
|
20
|
+
"source": "GUDHUB/DataService/IndexedDB/appRequestWorker.js",
|
|
21
|
+
"context": "web-worker",
|
|
22
|
+
"optimize": true,
|
|
23
|
+
"sourceMap": false,
|
|
24
|
+
"engines": {
|
|
25
|
+
"browserslist": "> 0.25%, last 2 versions, not dead"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"parcelIgnore": [
|
|
30
|
+
"PARCEL_APP_REQUEST_WORKER_FILENAME.js"
|
|
31
|
+
],
|
|
26
32
|
"repository": {
|
|
27
33
|
"type": "git",
|
|
28
34
|
"url": "git+ssh://git@bitbucket.org/AAtlas/gudhub.git"
|
|
@@ -32,29 +38,35 @@
|
|
|
32
38
|
"license": "ISC",
|
|
33
39
|
"homepage": "https://bitbucket.org/AAtlas/gudhub#readme",
|
|
34
40
|
"dependencies": {
|
|
41
|
+
"@babel/runtime": "7.26.0",
|
|
42
|
+
"@babel/runtime-corejs3": "7.26.0",
|
|
43
|
+
"@rollup/plugin-babel": "6.0.4",
|
|
35
44
|
"axios": "^0.21.0",
|
|
36
|
-
"babel-loader": "^9.2.1",
|
|
37
45
|
"date-fns": "^2.16.1",
|
|
38
46
|
"fuse.js": "^6.4.6",
|
|
39
47
|
"jsonpath": "^1.0.2",
|
|
40
48
|
"qs": "^6.9.4",
|
|
41
49
|
"regenerator-runtime": "^0.13.9",
|
|
42
|
-
"webpack-cli": "^5.1.4",
|
|
43
|
-
"worker-loader": "^3.0.8",
|
|
44
50
|
"ws": "^7.3.1"
|
|
45
51
|
},
|
|
46
52
|
"devDependencies": {
|
|
47
|
-
"@babel/core": "
|
|
48
|
-
"@babel/
|
|
53
|
+
"@babel/core": "7.26.0",
|
|
54
|
+
"@babel/plugin-transform-runtime": "7.25.9",
|
|
55
|
+
"@babel/preset-env": "7.26.0",
|
|
56
|
+
"@parcel/optimizer-data-url": "^2.13.3",
|
|
57
|
+
"@parcel/transformer-inline-string": "^2.13.3",
|
|
49
58
|
"canvas": "^2.9.3",
|
|
59
|
+
"core-js": "3.40.0",
|
|
50
60
|
"express": "^4.17.1",
|
|
51
61
|
"jsdom": "^20.0.0",
|
|
52
62
|
"mocha": "^8.1.2",
|
|
63
|
+
"parcel": "2.13.3",
|
|
64
|
+
"parcel-resolver-ignore": "2.2.0",
|
|
65
|
+
"process": "^0.11.10",
|
|
53
66
|
"should": "^13.2.3",
|
|
54
67
|
"sinon": "^14.0.0",
|
|
55
|
-
"
|
|
68
|
+
"vite": "6.0.7"
|
|
56
69
|
},
|
|
57
|
-
"type": "module",
|
|
58
70
|
"publishConfig": {
|
|
59
71
|
"access": "public"
|
|
60
72
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import { resolve } from 'path'
|
|
3
|
+
import { babel } from '@rollup/plugin-babel';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
build: {
|
|
8
|
+
rollupOptions: {
|
|
9
|
+
output: {
|
|
10
|
+
// Enables inline worker support using a data URI
|
|
11
|
+
inlineDynamicImports: true,
|
|
12
|
+
// globals: {
|
|
13
|
+
// GudHub: 'GudHub',
|
|
14
|
+
// },
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
lib: {
|
|
20
|
+
entry: resolve(__dirname, 'index.js'),
|
|
21
|
+
fileName: (format) => `gudhub.${format}.js`,
|
|
22
|
+
name: 'GudHub',
|
|
23
|
+
formats: ['es'],
|
|
24
|
+
},
|
|
25
|
+
emptyOutDir: false,
|
|
26
|
+
},
|
|
27
|
+
plugins: [
|
|
28
|
+
{
|
|
29
|
+
name: 'worker-loader',
|
|
30
|
+
transform(code, id) {
|
|
31
|
+
if (id.endsWith('PARCEL_APP_REQUEST_WORKER_FILENAME.js')) {
|
|
32
|
+
return {
|
|
33
|
+
code: `export default new URL('${id}?worker', import.meta.url)`,
|
|
34
|
+
map: null // Optional: if you want source maps for the worker
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return code
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
babel({
|
|
41
|
+
presets: [
|
|
42
|
+
[
|
|
43
|
+
'@babel/preset-env', {
|
|
44
|
+
targets: '> 0.25%, last 2 versions, not dead',
|
|
45
|
+
// useBuiltIns: 'entry', // @babel/plugin-transform-runtime When this plugin is enabled, the useBuiltIns option in @babel/preset-env must not be set. Otherwise, this plugin may not able to completely sandbox the environment.
|
|
46
|
+
corejs: '3.40.0',
|
|
47
|
+
shippedProposals: true,
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
plugins: [
|
|
53
|
+
[
|
|
54
|
+
'@babel/plugin-transform-runtime', {
|
|
55
|
+
"corejs": { version: 3, proposals: true }, // will be replaced. Take a look to https://github.com/babel/babel-polyfills/blob/main/packages/babel-plugin-polyfill-corejs3/README.md
|
|
56
|
+
"helpers": true,
|
|
57
|
+
"regenerator": true,
|
|
58
|
+
"version": "7.26.0"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
],
|
|
62
|
+
|
|
63
|
+
babelHelpers: 'runtime',
|
|
64
|
+
}),
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import { resolve } from 'path'
|
|
3
|
+
import { babel } from '@rollup/plugin-babel';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
build: {
|
|
8
|
+
rollupOptions: {
|
|
9
|
+
output: {
|
|
10
|
+
// Enables inline worker support using a data URI
|
|
11
|
+
inlineDynamicImports: true,
|
|
12
|
+
globals: {
|
|
13
|
+
GudHub: 'GudHub',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
lib: {
|
|
20
|
+
entry: resolve(__dirname, 'indexUMD.js'),
|
|
21
|
+
fileName: (format) => `gudhub.${format}.js`,
|
|
22
|
+
name: 'GudHub',
|
|
23
|
+
formats: ['umd'],
|
|
24
|
+
},
|
|
25
|
+
emptyOutDir: false,
|
|
26
|
+
},
|
|
27
|
+
plugins: [
|
|
28
|
+
{
|
|
29
|
+
name: 'worker-loader',
|
|
30
|
+
transform(code, id) {
|
|
31
|
+
if (id.endsWith('PARCEL_APP_REQUEST_WORKER_FILENAME.js')) {
|
|
32
|
+
return {
|
|
33
|
+
code: `export default new URL('${id}?worker', import.meta.url)`,
|
|
34
|
+
map: null // Optional: if you want source maps for the worker
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return code
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
babel({
|
|
41
|
+
presets: [
|
|
42
|
+
[
|
|
43
|
+
'@babel/preset-env', {
|
|
44
|
+
targets: '> 0.25%, last 2 versions, not dead',
|
|
45
|
+
// useBuiltIns: 'entry', // @babel/plugin-transform-runtime When this plugin is enabled, the useBuiltIns option in @babel/preset-env must not be set. Otherwise, this plugin may not able to completely sandbox the environment.
|
|
46
|
+
corejs: '3.40.0',
|
|
47
|
+
shippedProposals: true,
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
],
|
|
51
|
+
|
|
52
|
+
plugins: [
|
|
53
|
+
[
|
|
54
|
+
'@babel/plugin-transform-runtime', {
|
|
55
|
+
"corejs": { version: 3, proposals: true }, // will be replaced. Take a look to https://github.com/babel/babel-polyfills/blob/main/packages/babel-plugin-polyfill-corejs3/README.md
|
|
56
|
+
"helpers": true,
|
|
57
|
+
"regenerator": true,
|
|
58
|
+
"version": "7.26.0"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
],
|
|
62
|
+
|
|
63
|
+
babelHelpers: 'runtime',
|
|
64
|
+
}),
|
|
65
|
+
]
|
|
66
|
+
});
|