@things-factory/shell 9.1.19 → 10.0.0-beta.1
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/_index.html +1 -2
- package/client/{bootstrap.js → bootstrap.ts} +3 -2
- package/client/index.ts +31 -0
- package/dist-server/graphql-local-client.js +1 -3
- package/dist-server/graphql-local-client.js.map +1 -1
- package/dist-server/server-dev.js +4 -3
- package/dist-server/server-dev.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/headless-pool/config.js +2 -2
- package/dist-server/utils/headless-pool/config.js.map +1 -1
- package/package.json +13 -15
- package/static/index.js +1 -5
- package/views/public/home.html +1 -1
- package/client/index.js +0 -17
- package/tests/database/connection.spec.ts +0 -26
- /package/client/{route.js → route.ts} +0 -0
- /package/client/serviceworker/{indexdb.js → indexdb.ts} +0 -0
- /package/client/serviceworker/{sw-src.js → sw-src.ts} +0 -0
- /package/client/{store.js → store.ts} +0 -0
|
@@ -19,7 +19,7 @@ exports.DEFAULT_POOL_CONFIG = {
|
|
|
19
19
|
'--hide-scrollbars',
|
|
20
20
|
'--mute-audio',
|
|
21
21
|
'--no-sandbox',
|
|
22
|
-
'--
|
|
22
|
+
'--enable-gpu',
|
|
23
23
|
'--use-mock-keychain',
|
|
24
24
|
'--disable-password-manager-reauthentication',
|
|
25
25
|
'--disable-keychain-reauthorization',
|
|
@@ -42,7 +42,7 @@ exports.DEFAULT_POOL_CONFIG = {
|
|
|
42
42
|
};
|
|
43
43
|
// Common argument sets
|
|
44
44
|
exports.HEADLESS_POOL_ARGUMENT_SETS = {
|
|
45
|
-
basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--
|
|
45
|
+
basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--enable-gpu'],
|
|
46
46
|
keychain_safe: [
|
|
47
47
|
'--use-mock-keychain',
|
|
48
48
|
'--disable-password-manager-reauthentication',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../server/utils/headless-pool/config.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwFH,kCAOC;AArED,yBAAyB;AACZ,QAAA,mBAAmB,GAAsD;IACpF,gBAAgB;IAChB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,MAAM,EAAE,YAAY;IACvC,YAAY,EAAE,IAAI;IAElB,mBAAmB;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE;QACJ,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,cAAc;QACd,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IACD,cAAc,EAAE,EAAE;IAElB,mBAAmB;IACnB,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAA;AAED,uBAAuB;AACV,QAAA,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IAE5E,aAAa,EAAE;QACb,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IAED,iBAAiB,EAAE,CAAC,0BAA0B,EAAE,yBAAyB,CAAC;CAC3E,CAAA;AAED,mCAAmC;AACnC,SAAgB,WAAW,CAAC,IAAwB,EAAE,WAA+B,EAAE;IACrF,OAAO;QACL,GAAG,2BAAmB;QACtB,GAAG,IAAI;QACP,GAAG,QAAQ;QACX,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,2BAAmB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KAC7E,CAAA;AACH,CAAC","sourcesContent":["/**\n * Headless Pool Configuration\n */\n\nexport type HeadlessMode = 'shell' | 'new' | boolean\n\nexport interface HeadlessPoolConfig {\n // Pool settings\n min?: number\n max?: number\n acquireTimeoutMillis?: number\n idleTimeoutMillis?: number\n testOnBorrow?: boolean\n\n // Browser launch settings\n headless?: HeadlessMode\n args?: string[]\n executablePath?: string\n\n // Features\n enableStats?: boolean\n enableRecovery?: boolean\n enableCleanup?: boolean\n\n // Custom setup function for special cases (like label pool)\n customSetup?: (browser: any) => Promise<any>\n}\n\n// Default configurations\nexport const DEFAULT_POOL_CONFIG: Required<Omit<HeadlessPoolConfig, 'customSetup'>> = {\n // Pool defaults\n min: 2,\n max: 10,\n acquireTimeoutMillis: 15000,\n idleTimeoutMillis: 300000, // 5 minutes\n testOnBorrow: true,\n\n // Browser defaults\n headless: 'shell',\n args: [\n '--hide-scrollbars',\n '--mute-audio',\n '--no-sandbox',\n '--
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../server/utils/headless-pool/config.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAwFH,kCAOC;AArED,yBAAyB;AACZ,QAAA,mBAAmB,GAAsD;IACpF,gBAAgB;IAChB,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,EAAE;IACP,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,MAAM,EAAE,YAAY;IACvC,YAAY,EAAE,IAAI;IAElB,mBAAmB;IACnB,QAAQ,EAAE,OAAO;IACjB,IAAI,EAAE;QACJ,mBAAmB;QACnB,cAAc;QACd,cAAc;QACd,cAAc;QACd,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IACD,cAAc,EAAE,EAAE;IAElB,mBAAmB;IACnB,WAAW,EAAE,KAAK;IAClB,cAAc,EAAE,KAAK;IACrB,aAAa,EAAE,IAAI;CACpB,CAAA;AAED,uBAAuB;AACV,QAAA,2BAA2B,GAAG;IACzC,KAAK,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,CAAC;IAE5E,aAAa,EAAE;QACb,qBAAqB;QACrB,6CAA6C;QAC7C,oCAAoC;QACpC,wBAAwB;QACxB,iCAAiC;QACjC,sBAAsB;QACtB,wBAAwB;QACxB,sDAAsD;QACtD,uCAAuC;QACvC,iCAAiC;QACjC,gBAAgB;QAChB,gCAAgC;QAChC,mCAAmC;KACpC;IAED,iBAAiB,EAAE,CAAC,0BAA0B,EAAE,yBAAyB,CAAC;CAC3E,CAAA;AAED,mCAAmC;AACnC,SAAgB,WAAW,CAAC,IAAwB,EAAE,WAA+B,EAAE;IACrF,OAAO;QACL,GAAG,2BAAmB;QACtB,GAAG,IAAI;QACP,GAAG,QAAQ;QACX,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,2BAAmB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;KAC7E,CAAA;AACH,CAAC","sourcesContent":["/**\n * Headless Pool Configuration\n */\n\nexport type HeadlessMode = 'shell' | 'new' | boolean\n\nexport interface HeadlessPoolConfig {\n // Pool settings\n min?: number\n max?: number\n acquireTimeoutMillis?: number\n idleTimeoutMillis?: number\n testOnBorrow?: boolean\n\n // Browser launch settings\n headless?: HeadlessMode\n args?: string[]\n executablePath?: string\n\n // Features\n enableStats?: boolean\n enableRecovery?: boolean\n enableCleanup?: boolean\n\n // Custom setup function for special cases (like label pool)\n customSetup?: (browser: any) => Promise<any>\n}\n\n// Default configurations\nexport const DEFAULT_POOL_CONFIG: Required<Omit<HeadlessPoolConfig, 'customSetup'>> = {\n // Pool defaults\n min: 2,\n max: 10,\n acquireTimeoutMillis: 15000,\n idleTimeoutMillis: 300000, // 5 minutes\n testOnBorrow: true,\n\n // Browser defaults\n headless: 'shell',\n args: [\n '--hide-scrollbars',\n '--mute-audio',\n '--no-sandbox',\n '--enable-gpu',\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n executablePath: '',\n\n // Feature defaults\n enableStats: false,\n enableRecovery: false,\n enableCleanup: true\n}\n\n// Common argument sets\nexport const HEADLESS_POOL_ARGUMENT_SETS = {\n basic: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--enable-gpu'],\n\n keychain_safe: [\n '--use-mock-keychain',\n '--disable-password-manager-reauthentication',\n '--disable-keychain-reauthorization',\n '--disable-web-security',\n '--disable-site-isolation-trials',\n '--disable-extensions',\n '--disable-default-apps',\n '--disable-component-extensions-with-background-pages',\n '--disable-background-timer-throttling',\n '--disable-background-networking',\n '--disable-sync',\n '--disable-features=TranslateUI',\n '--disable-ipc-flooding-protection'\n ],\n\n security_enhanced: ['--disable-setuid-sandbox', '--disable-dev-shm-usage']\n}\n\n// Helper function to merge configs\nexport function mergeConfig(base: HeadlessPoolConfig, override: HeadlessPoolConfig = {}): HeadlessPoolConfig {\n return {\n ...DEFAULT_POOL_CONFIG,\n ...base,\n ...override,\n args: [...(base.args || DEFAULT_POOL_CONFIG.args), ...(override.args || [])]\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/shell",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0-beta.1",
|
|
4
4
|
"description": "Core module for framework",
|
|
5
5
|
"bin": {
|
|
6
6
|
"things-factory": "bin/things-factory",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"things-factory-dockerize-arm": "bin/things-factory-dockerize-arm"
|
|
12
12
|
},
|
|
13
13
|
"main": "dist-server/index.js",
|
|
14
|
-
"browser": "client/index.
|
|
14
|
+
"browser": "client/index.ts",
|
|
15
15
|
"author": "Hearty Oh <heartyoh@hatiolab.com>",
|
|
16
16
|
"things-factory": true,
|
|
17
17
|
"license": "MIT",
|
|
@@ -51,18 +51,18 @@
|
|
|
51
51
|
"@material/mwc-textfield": "^0.27.0",
|
|
52
52
|
"@material/web": "^2.0.0",
|
|
53
53
|
"@open-wc/scoped-elements": "^2.1.3",
|
|
54
|
-
"@operato/graphql": "^
|
|
55
|
-
"@operato/help": "^
|
|
56
|
-
"@operato/layout": "^
|
|
57
|
-
"@operato/shell": "^
|
|
58
|
-
"@operato/typeorm-history": "^
|
|
59
|
-
"@operato/utils": "^
|
|
54
|
+
"@operato/graphql": "^10.0.0-beta.1",
|
|
55
|
+
"@operato/help": "^10.0.0-beta.1",
|
|
56
|
+
"@operato/layout": "^10.0.0-beta.1",
|
|
57
|
+
"@operato/shell": "^10.0.0-beta.1",
|
|
58
|
+
"@operato/typeorm-history": "^10.0.0-beta.1",
|
|
59
|
+
"@operato/utils": "^10.0.0-beta.1",
|
|
60
60
|
"@reduxjs/toolkit": "^2.2.5",
|
|
61
|
-
"@things-factory/ejs-remote": "^
|
|
62
|
-
"@things-factory/env": "^
|
|
61
|
+
"@things-factory/ejs-remote": "^10.0.0-beta.1",
|
|
62
|
+
"@things-factory/env": "^10.0.0-beta.1",
|
|
63
63
|
"@things-factory/operato-license-checker": "^4.0.4",
|
|
64
|
-
"@things-factory/styles": "^
|
|
65
|
-
"@things-factory/utils": "^
|
|
64
|
+
"@things-factory/styles": "^10.0.0-beta.1",
|
|
65
|
+
"@things-factory/utils": "^10.0.0-beta.1",
|
|
66
66
|
"@webcomponents/scoped-custom-element-registry": "^0.0.9",
|
|
67
67
|
"@webcomponents/webcomponentsjs": "^2.6.0",
|
|
68
68
|
"args": "^5.0.0",
|
|
@@ -107,7 +107,6 @@
|
|
|
107
107
|
"pluralize": "^8.0.0",
|
|
108
108
|
"promises-all": "^1.0.0",
|
|
109
109
|
"puppeteer": "^24.5.0",
|
|
110
|
-
"pwa-helpers": "^0.9.1",
|
|
111
110
|
"react": "^18.2.0",
|
|
112
111
|
"react-dom": "^18.2.0",
|
|
113
112
|
"reflect-metadata": "^0.2.2",
|
|
@@ -118,7 +117,6 @@
|
|
|
118
117
|
"type-graphql": "^2.0.0-rc.2",
|
|
119
118
|
"typeorm": "^0.3.19",
|
|
120
119
|
"uuid": "^10.0.0",
|
|
121
|
-
"web-animations-js": "^2.3.2",
|
|
122
120
|
"web-push": "^3.5.0",
|
|
123
121
|
"webpack-dev-middleware": "^7.4.2",
|
|
124
122
|
"ws": "^8.8.1"
|
|
@@ -131,5 +129,5 @@
|
|
|
131
129
|
"pg": "^8.7.3",
|
|
132
130
|
"sqlite3": "^5.0.8"
|
|
133
131
|
},
|
|
134
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "90f40bf160fa25edf4560d7893cfd576cf474411"
|
|
135
133
|
}
|
package/static/index.js
CHANGED
package/views/public/home.html
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
67
67
|
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
|
68
68
|
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
<!-- Built with love using PWA Starter Kit -->
|
|
71
71
|
|
|
72
72
|
<script src="/public/home.js"></script>
|
package/client/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// import '@webcomponents/scoped-custom-element-registry' // later only for @open-wc/scoped-elements@3
|
|
2
|
-
import 'broadcastchannel-polyfill'
|
|
3
|
-
import '@operato/shell/app.js'
|
|
4
|
-
|
|
5
|
-
/* Export ENV */
|
|
6
|
-
export const PROCESS = {
|
|
7
|
-
'APP-VERSION': process.env['APP-VERSION'],
|
|
8
|
-
'NODE-ENV': process.env['NODE-ENV']
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* Export APIs */
|
|
12
|
-
|
|
13
|
-
// store, actions, page-view,
|
|
14
|
-
export * from '@operato/shell'
|
|
15
|
-
|
|
16
|
-
// graphql-client
|
|
17
|
-
export * from '@operato/graphql'
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { databaseInitializer } from '../../server/initializers/database'
|
|
2
|
-
|
|
3
|
-
describe('orm', () => {
|
|
4
|
-
var connection
|
|
5
|
-
|
|
6
|
-
beforeAll(async () => {
|
|
7
|
-
connection = await databaseInitializer()
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
afterAll(async () => {
|
|
11
|
-
await connection.close()
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
beforeEach(async () => {
|
|
15
|
-
const entities = connection.entityMetadatas
|
|
16
|
-
|
|
17
|
-
entities.forEach(async entity => {
|
|
18
|
-
const repository = connection.getRepository(entity.name)
|
|
19
|
-
await repository.query(`DELETE FROM ${entity.tableName}`)
|
|
20
|
-
})
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
it('creates a user', () => {
|
|
24
|
-
// TODO
|
|
25
|
-
})
|
|
26
|
-
})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|