create-ones-app 0.0.7 → 0.0.8
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/LICENSE +201 -0
- package/dist/index.cjs +7087 -22
- package/dist/index.js +7091 -26
- package/dist/types/actions/create/index.d.ts +3 -0
- package/dist/types/actions/create/index.d.ts.map +1 -0
- package/dist/types/actions/create/normalize.d.ts +6 -0
- package/dist/types/actions/create/normalize.d.ts.map +1 -0
- package/dist/types/actions/index.d.ts +5 -0
- package/dist/types/actions/index.d.ts.map +1 -0
- package/dist/types/cli/index.d.ts +2 -0
- package/dist/types/cli/index.d.ts.map +1 -0
- package/dist/types/command/create/index.d.ts +9 -0
- package/dist/types/command/create/index.d.ts.map +1 -0
- package/dist/types/command/index.d.ts +5 -0
- package/dist/types/command/index.d.ts.map +1 -0
- package/dist/types/common/command/index.d.ts +6 -0
- package/dist/types/common/command/index.d.ts.map +1 -0
- package/dist/types/common/command/types.d.ts +10 -0
- package/dist/types/common/command/types.d.ts.map +1 -0
- package/dist/types/common/command/utils.d.ts +8 -0
- package/dist/types/common/command/utils.d.ts.map +1 -0
- package/dist/types/common/context/index.d.ts +6 -0
- package/dist/types/common/context/index.d.ts.map +1 -0
- package/dist/types/common/context/types.d.ts +6 -0
- package/dist/types/common/context/types.d.ts.map +1 -0
- package/dist/types/common/context/utils.d.ts +4 -0
- package/dist/types/common/context/utils.d.ts.map +1 -0
- package/dist/types/common/error/enums.d.ts +7 -0
- package/dist/types/common/error/enums.d.ts.map +1 -0
- package/dist/types/common/error/index.d.ts +7 -0
- package/dist/types/common/error/index.d.ts.map +1 -0
- package/dist/types/common/error/types.d.ts +2 -0
- package/dist/types/common/error/types.d.ts.map +1 -0
- package/dist/types/common/error/utils.d.ts +2 -0
- package/dist/types/common/error/utils.d.ts.map +1 -0
- package/dist/types/common/locales/en/index.d.ts +10 -0
- package/dist/types/common/locales/en/index.d.ts.map +1 -0
- package/dist/types/common/locales/index.d.ts +6 -0
- package/dist/types/common/locales/index.d.ts.map +1 -0
- package/dist/types/common/locales/types.d.ts +4 -0
- package/dist/types/common/locales/types.d.ts.map +1 -0
- package/dist/types/common/locales/utils.d.ts +6 -0
- package/dist/types/common/locales/utils.d.ts.map +1 -0
- package/dist/types/common/package/consts.d.ts +6 -0
- package/dist/types/common/package/consts.d.ts.map +1 -0
- package/dist/types/common/package/index.d.ts +8 -0
- package/dist/types/common/package/index.d.ts.map +1 -0
- package/dist/types/common/package/schema.d.ts +345 -0
- package/dist/types/common/package/schema.d.ts.map +1 -0
- package/dist/types/common/package/types.d.ts.map +1 -0
- package/dist/types/common/package/utils.d.ts +5 -0
- package/dist/types/common/package/utils.d.ts.map +1 -0
- package/dist/types/common/public/consts.d.ts +5 -0
- package/dist/types/common/public/consts.d.ts.map +1 -0
- package/dist/types/common/public/index.d.ts +6 -0
- package/dist/types/common/public/index.d.ts.map +1 -0
- package/dist/types/common/public/utils.d.ts +2 -0
- package/dist/types/common/public/utils.d.ts.map +1 -0
- package/dist/types/common/template/index.d.ts +5 -0
- package/dist/types/common/template/index.d.ts.map +1 -0
- package/dist/types/common/template/utils.d.ts +4 -0
- package/dist/types/common/template/utils.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +26 -5
- package/public/.onesrc.json +9 -0
- package/public/app_opkx_schema.json +566 -0
- package/public/logos/logo-bulb.svg +20 -0
- package/public/logos/logo-check.svg +18 -0
- package/public/logos/logo-claude.svg +19 -0
- package/public/logos/logo-claw.svg +23 -0
- package/public/logos/logo-gear.svg +18 -0
- package/public/logos/logo-gemini.svg +19 -0
- package/public/logos/logo-haiper.svg +19 -0
- package/public/logos/logo-lightning.svg +19 -0
- package/public/logos/logo-manus.svg +21 -0
- package/public/logos/logo-new-api.svg +21 -0
- package/public/logos/logo-puzzle.svg +19 -0
- package/public/logos/logo-trae.svg +19 -0
- package/public/logos/logo-user.svg +20 -0
- package/public/opkx.json +21 -0
- package/template/example/.template.json +1 -1
- package/template/example/AGENTS.md +92 -103
- package/template/example/LICENSE +201 -0
- package/template/example/README.md +1 -84
- package/template/example/_eslint.config.mjs_ +39 -0
- package/template/example/_gitignore +23 -0
- package/template/example/_husky_pre-commit +1 -0
- package/template/example/_prettierignore +11 -0
- package/template/example/_prettierrc +6 -0
- package/template/example/_tsconfig.json +8 -0
- package/template/example/backend/app.controller.ts +85 -0
- package/template/example/backend/app.module.ts +34 -0
- package/template/example/backend/app.service.ts +46 -0
- package/template/example/backend/dto/issue-created-event.dto.ts +29 -0
- package/template/example/backend/dto/recent-work-item.dto.ts +11 -0
- package/template/example/backend/main.ts +10 -0
- package/template/example/backend/proxy.ts +46 -0
- package/template/example/backend/services/recent-work-items.service.ts +84 -0
- package/template/example/backend/utils.ts +41 -0
- package/template/example/nest-cli.json +8 -0
- package/template/example/opkx.json +106 -0
- package/template/example/package-lock.json +12699 -0
- package/template/example/package.json +84 -0
- package/template/example/postcss.config.js +10 -0
- package/template/example/public/assets/loading.png +0 -0
- package/template/example/public/favicon.ico +0 -0
- package/template/example/public/i18n/en.json +17 -0
- package/template/example/public/i18n/zh.json +17 -0
- package/template/example/public/normalize.css@8.0.1/normalize.css +349 -0
- package/template/example/tsconfig.backend.json +34 -0
- package/template/example/tsconfig.build.json +3 -0
- package/template/example/tsconfig.vite.json +34 -0
- package/template/example/tsconfig.web.json +39 -0
- package/template/example/vite.config.ts +286 -0
- package/template/example/web/pages/recent-work-items/index.css +131 -0
- package/template/example/web/pages/recent-work-items/index.tsx +265 -0
- package/template/example/web/template/index.html +65 -0
- package/dist/types/action.d.ts +0 -2
- package/dist/types/action.d.ts.map +0 -1
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/utils.d.ts +0 -7
- package/dist/types/utils.d.ts.map +0 -1
- package/template/example/netlify/functions/app_manifest.js +0 -90
- package/template/example/netlify/functions/app_setting_pages.js +0 -48
- package/template/example/netlify/functions/events.js +0 -35
- package/template/example/netlify/functions/install.js +0 -35
- package/template/example/netlify/functions/metadata.js +0 -37
- package/template/example/netlify.toml +0 -44
- package/template/example/public/index.html +0 -20
- package/template/example/public/logo.svg +0 -4
- package/template/example/public/script.js +0 -56
- package/template/example/public/style.css +0 -66
- package/template/example/types/app_manifest.d.ts +0 -115
- package/template/example/types/app_setting_pages.d.ts +0 -14
- /package/dist/types/{types.d.ts → common/package/types.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/public/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,cAGzB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/template/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/common/template/utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe,cAG3B,CAAA;AAED,eAAO,MAAM,kBAAkB,gBAG9B,CAAA;AAED,eAAO,MAAM,kBAAkB,cAE9B,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { runCommandCreate } from './cli';
|
|
2
|
+
export { $create } from './command';
|
|
3
|
+
export { throwError, ErrorCode } from './common/error';
|
|
4
|
+
export type { Error } from './common/error';
|
|
5
|
+
export { getContext, setContext } from './common/context';
|
|
6
|
+
export type { Context, ContextKey } from './common/context';
|
|
7
|
+
export { getCommandOptions, addCommandUsage, addCommandOutput } from './common/command';
|
|
8
|
+
export type { AnyCommandArguments, AnyCommandOptions, CommandArguments, CommandOptions, } from './common/command';
|
|
9
|
+
export { getPublicPath, PUBLIC_FILENAME } from './common/public';
|
|
10
|
+
export { AppPackageJSONSchema, AppManifestJSONSchema, AppManifestStrictJSONSchema, AppRcJSONSchema, HostedTokenScope, } from './common/package';
|
|
11
|
+
export type { PackageJSON, AppPackageJSON, AppManifestJSON, AppRcJSON } from './common/package';
|
|
2
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACtD,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AACzD,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACvF,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,GACf,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAChE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,EACf,gBAAgB,GACjB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ones-app",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
8
|
+
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/types/index.d.ts",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"dist",
|
|
40
40
|
"index.d.ts",
|
|
41
41
|
"index.js",
|
|
42
|
+
"public",
|
|
42
43
|
"template"
|
|
43
44
|
],
|
|
44
45
|
"bin": {
|
|
@@ -50,11 +51,31 @@
|
|
|
50
51
|
"access": "public"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"@
|
|
54
|
+
"@nestjs/common": "^11.0.1",
|
|
55
|
+
"@nestjs/core": "^11.0.1",
|
|
56
|
+
"@nestjs/serve-static": "^5.0.4",
|
|
57
|
+
"@ones-design/core": "^2.37.2",
|
|
58
|
+
"@ones-design/icons": "^2.59.3",
|
|
59
|
+
"@ones-design/table": "^1.7.2",
|
|
60
|
+
"@ones-open/node-sdk": "0.0.8",
|
|
61
|
+
"@ones-open/web-sdk": "0.0.8",
|
|
62
|
+
"@types/express": "5.0.6",
|
|
63
|
+
"@types/fs-extra": "^11.0.4",
|
|
64
|
+
"@types/lodash-es": "^4.17.12",
|
|
65
|
+
"glob": "^13.0.2",
|
|
66
|
+
"vite-plugin-css-injected-by-js": "^3.5.2"
|
|
54
67
|
},
|
|
55
68
|
"dependencies": {
|
|
69
|
+
"@babel/runtime-corejs3": "~7.26.10",
|
|
70
|
+
"ajv": "^8.17.1",
|
|
71
|
+
"ajv-formats": "^3.0.1",
|
|
56
72
|
"chalk": "^5.0.1",
|
|
57
73
|
"commander": "~9.4.0",
|
|
58
|
-
"fs-extra": "^11.3.0"
|
|
59
|
-
|
|
74
|
+
"fs-extra": "^11.3.0",
|
|
75
|
+
"lodash-es": "^4.17.21",
|
|
76
|
+
"type-fest": "4.41.0",
|
|
77
|
+
"uuid": "^13.0.0",
|
|
78
|
+
"zod": "^3.22.2"
|
|
79
|
+
},
|
|
80
|
+
"gitHead": "abf183f0cf3af3573c4e24d96546b4ee05eb96b1"
|
|
60
81
|
}
|
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "ONES Hosted App OPKX Manifest Schema",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": ["app", "runtime"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"app": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "Application configuration. See app_schema.json for complete definition.",
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"auth": {
|
|
14
|
+
"properties": {
|
|
15
|
+
"type": {
|
|
16
|
+
"description": "Authentication type (currently only 'jwt' is supported)",
|
|
17
|
+
"enum": ["jwt"],
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["type"],
|
|
22
|
+
"type": "object"
|
|
23
|
+
},
|
|
24
|
+
"desc": {
|
|
25
|
+
"maxLength": 1024,
|
|
26
|
+
"type": ["string", "null"]
|
|
27
|
+
},
|
|
28
|
+
"events": {
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"properties": {
|
|
31
|
+
"types": {
|
|
32
|
+
"items": {
|
|
33
|
+
"properties": {
|
|
34
|
+
"eventType": {
|
|
35
|
+
"description": "The event defined by ONES which the app will listen to.",
|
|
36
|
+
"minLength": 1,
|
|
37
|
+
"type": "string"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": ["eventType"],
|
|
41
|
+
"type": "object"
|
|
42
|
+
},
|
|
43
|
+
"minItems": 1,
|
|
44
|
+
"type": "array"
|
|
45
|
+
},
|
|
46
|
+
"url": {
|
|
47
|
+
"description": "Must start with / and not contain #",
|
|
48
|
+
"maxLength": 256,
|
|
49
|
+
"pattern": "^/[^#\\s]*$",
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"required": ["url", "types"],
|
|
54
|
+
"type": ["object", "null"]
|
|
55
|
+
},
|
|
56
|
+
"extensions": {
|
|
57
|
+
"properties": {
|
|
58
|
+
"manhourValidator": {
|
|
59
|
+
"items": {
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"properties": {
|
|
62
|
+
"key": {
|
|
63
|
+
"description": "Unique identifier for the extension in the app.",
|
|
64
|
+
"maxLength": 64,
|
|
65
|
+
"minLength": 1,
|
|
66
|
+
"type": "string"
|
|
67
|
+
},
|
|
68
|
+
"funcs": {
|
|
69
|
+
"properties": {
|
|
70
|
+
"validate": {
|
|
71
|
+
"description": "Must start with /",
|
|
72
|
+
"maxLength": 256,
|
|
73
|
+
"minLength": 1,
|
|
74
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
75
|
+
"type": "string"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": ["validate"],
|
|
79
|
+
"type": "object"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"required": ["key", "funcs"],
|
|
83
|
+
"type": "object"
|
|
84
|
+
},
|
|
85
|
+
"minItems": 1,
|
|
86
|
+
"type": "array",
|
|
87
|
+
"uniqueItems": true
|
|
88
|
+
},
|
|
89
|
+
"accountThirdparty": {
|
|
90
|
+
"items": {
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"properties": {
|
|
93
|
+
"key": {
|
|
94
|
+
"description": "Unique identifier for the extension in the app.",
|
|
95
|
+
"maxLength": 64,
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"funcs": {
|
|
100
|
+
"additionalProperties": false,
|
|
101
|
+
"properties": {
|
|
102
|
+
"customLoginUrl": {
|
|
103
|
+
"description": "Must start with /",
|
|
104
|
+
"maxLength": 256,
|
|
105
|
+
"minLength": 1,
|
|
106
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"authLoginInfo": {
|
|
110
|
+
"description": "Must start with /",
|
|
111
|
+
"maxLength": 256,
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"directorySync": {
|
|
117
|
+
"description": "Must start with /",
|
|
118
|
+
"maxLength": 256,
|
|
119
|
+
"minLength": 1,
|
|
120
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
121
|
+
"type": "string"
|
|
122
|
+
},
|
|
123
|
+
"messageNotify": {
|
|
124
|
+
"description": "Must start with /",
|
|
125
|
+
"maxLength": 256,
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
128
|
+
"type": "string"
|
|
129
|
+
},
|
|
130
|
+
"helpInfo": {
|
|
131
|
+
"description": "Must start with /",
|
|
132
|
+
"maxLength": 256,
|
|
133
|
+
"minLength": 1,
|
|
134
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
135
|
+
"type": "string"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"required": ["helpInfo"],
|
|
139
|
+
"type": "object"
|
|
140
|
+
},
|
|
141
|
+
"slots": {
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"properties": {
|
|
144
|
+
"ones:account:thirdparty:logo": {
|
|
145
|
+
"description": "Must start with /",
|
|
146
|
+
"maxLength": 256,
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
149
|
+
"type": "string"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"type": "object"
|
|
153
|
+
},
|
|
154
|
+
"config": {
|
|
155
|
+
"additionalProperties": false,
|
|
156
|
+
"properties": {
|
|
157
|
+
"useCustomLoginAuth": {
|
|
158
|
+
"type": "boolean"
|
|
159
|
+
},
|
|
160
|
+
"useDirectorySource": {
|
|
161
|
+
"type": "boolean"
|
|
162
|
+
},
|
|
163
|
+
"useNotification": {
|
|
164
|
+
"type": "boolean"
|
|
165
|
+
},
|
|
166
|
+
"notificationUserIdType": {
|
|
167
|
+
"default": "ONES",
|
|
168
|
+
"enum": ["ONES", "Custom"],
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
"required": ["useCustomLoginAuth", "useDirectorySource", "useNotification"],
|
|
173
|
+
"type": "object"
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"required": ["key", "funcs", "config"],
|
|
177
|
+
"type": "object"
|
|
178
|
+
},
|
|
179
|
+
"minItems": 1,
|
|
180
|
+
"type": "array",
|
|
181
|
+
"uniqueItems": true
|
|
182
|
+
},
|
|
183
|
+
"appSettingPages": {
|
|
184
|
+
"items": {
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"funcs": {
|
|
188
|
+
"properties": {
|
|
189
|
+
"customEntries": {
|
|
190
|
+
"description": "Must start with /",
|
|
191
|
+
"maxLength": 256,
|
|
192
|
+
"minLength": 1,
|
|
193
|
+
"pattern": "^/[^\\s?#]*([?][^\\s#]*)?([#][^\\s]*)?$",
|
|
194
|
+
"type": "string"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"required": ["customEntries"],
|
|
198
|
+
"type": "object"
|
|
199
|
+
},
|
|
200
|
+
"key": {
|
|
201
|
+
"description": "Unique identifier for the extension in the app.",
|
|
202
|
+
"maxLength": 64,
|
|
203
|
+
"minLength": 1,
|
|
204
|
+
"type": "string"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"required": ["key", "funcs"],
|
|
208
|
+
"type": "object"
|
|
209
|
+
},
|
|
210
|
+
"maxItems": 1,
|
|
211
|
+
"minItems": 1,
|
|
212
|
+
"type": "array"
|
|
213
|
+
},
|
|
214
|
+
"formControlExtension": {
|
|
215
|
+
"items": {
|
|
216
|
+
"additionalProperties": true,
|
|
217
|
+
"properties": {
|
|
218
|
+
"key": {
|
|
219
|
+
"description": "Unique identifier for the extension in the app.",
|
|
220
|
+
"maxLength": 64,
|
|
221
|
+
"minLength": 1,
|
|
222
|
+
"type": "string"
|
|
223
|
+
},
|
|
224
|
+
"slots": {
|
|
225
|
+
"additionalProperties": {
|
|
226
|
+
"minLength": 1,
|
|
227
|
+
"type": "string"
|
|
228
|
+
},
|
|
229
|
+
"minProperties": 1,
|
|
230
|
+
"type": "object"
|
|
231
|
+
},
|
|
232
|
+
"config": {
|
|
233
|
+
"additionalProperties": true,
|
|
234
|
+
"properties": {
|
|
235
|
+
"name": {
|
|
236
|
+
"minLength": 1,
|
|
237
|
+
"type": "string"
|
|
238
|
+
},
|
|
239
|
+
"fieldUUIDs": {
|
|
240
|
+
"items": {
|
|
241
|
+
"minLength": 1,
|
|
242
|
+
"type": "string"
|
|
243
|
+
},
|
|
244
|
+
"type": "array",
|
|
245
|
+
"uniqueItems": true
|
|
246
|
+
},
|
|
247
|
+
"supportForms": {
|
|
248
|
+
"items": {
|
|
249
|
+
"enum": ["detail", "create", "transition"],
|
|
250
|
+
"type": "string"
|
|
251
|
+
},
|
|
252
|
+
"minItems": 1,
|
|
253
|
+
"type": "array",
|
|
254
|
+
"uniqueItems": true
|
|
255
|
+
},
|
|
256
|
+
"controlTips": {
|
|
257
|
+
"oneOf": [
|
|
258
|
+
{
|
|
259
|
+
"type": "string"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"additionalProperties": {
|
|
263
|
+
"minLength": 1,
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"minProperties": 1,
|
|
267
|
+
"type": "object"
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": ["name", "fieldUUIDs", "supportForms"],
|
|
273
|
+
"type": "object"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"required": ["key", "slots", "config"],
|
|
277
|
+
"type": "object"
|
|
278
|
+
},
|
|
279
|
+
"minItems": 1,
|
|
280
|
+
"type": "array",
|
|
281
|
+
"uniqueItems": true
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"type": ["object", "null"]
|
|
285
|
+
},
|
|
286
|
+
"id": {
|
|
287
|
+
"description": "Format: app_ + 16 lowercase alphanumeric chars",
|
|
288
|
+
"maxLength": 20,
|
|
289
|
+
"minLength": 20,
|
|
290
|
+
"pattern": "^app_[0-9a-z]{16}$",
|
|
291
|
+
"type": "string"
|
|
292
|
+
},
|
|
293
|
+
"lifecycle_callback": {
|
|
294
|
+
"properties": {
|
|
295
|
+
"disabled": {
|
|
296
|
+
"description": "Must start with / and not contain #",
|
|
297
|
+
"maxLength": 256,
|
|
298
|
+
"pattern": "^/[^#\\s]*$",
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"enabled": {
|
|
302
|
+
"description": "Must start with / and not contain #",
|
|
303
|
+
"maxLength": 256,
|
|
304
|
+
"pattern": "^/[^#\\s]*$",
|
|
305
|
+
"type": "string"
|
|
306
|
+
},
|
|
307
|
+
"install": {
|
|
308
|
+
"description": "Must start with / and not contain #",
|
|
309
|
+
"maxLength": 256,
|
|
310
|
+
"pattern": "^/[^#\\s]*$",
|
|
311
|
+
"type": "string"
|
|
312
|
+
},
|
|
313
|
+
"uninstalled": {
|
|
314
|
+
"description": "Must start with / and not contain #",
|
|
315
|
+
"maxLength": 256,
|
|
316
|
+
"pattern": "^/[^#\\s]*$",
|
|
317
|
+
"type": "string"
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
"required": ["install"],
|
|
321
|
+
"type": "object"
|
|
322
|
+
},
|
|
323
|
+
"logo": {
|
|
324
|
+
"maxLength": 256,
|
|
325
|
+
"pattern": "^(https?://[^\\s?#]+|/[^\\s?#]+)$",
|
|
326
|
+
"description": "Must start with / and not contain # or http(s) URLs",
|
|
327
|
+
"type": ["string", "null"]
|
|
328
|
+
},
|
|
329
|
+
"name": {
|
|
330
|
+
"maxLength": 64,
|
|
331
|
+
"minLength": 1,
|
|
332
|
+
"type": "string"
|
|
333
|
+
},
|
|
334
|
+
"oauth": {
|
|
335
|
+
"additionalProperties": false,
|
|
336
|
+
"properties": {
|
|
337
|
+
"redirect_url": {
|
|
338
|
+
"description": "Must start with / and not contain #",
|
|
339
|
+
"maxLength": 256,
|
|
340
|
+
"pattern": "^/[^#\\s]*$",
|
|
341
|
+
"type": ["string", "null"]
|
|
342
|
+
},
|
|
343
|
+
"scope": {
|
|
344
|
+
"items": {
|
|
345
|
+
"pattern": "^[a-z]+:[0-9a-zA-Z\\-]+:[0-9a-zA-Z\\-]+$",
|
|
346
|
+
"type": "string"
|
|
347
|
+
},
|
|
348
|
+
"minItems": 1,
|
|
349
|
+
"type": "array",
|
|
350
|
+
"uniqueItems": true
|
|
351
|
+
},
|
|
352
|
+
"type": {
|
|
353
|
+
"items": {
|
|
354
|
+
"enum": ["app", "user"],
|
|
355
|
+
"type": "string"
|
|
356
|
+
},
|
|
357
|
+
"minItems": 1,
|
|
358
|
+
"type": ["array", "null"],
|
|
359
|
+
"uniqueItems": true
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"required": ["scope"],
|
|
363
|
+
"type": ["object", "null"]
|
|
364
|
+
},
|
|
365
|
+
"ones_version": {
|
|
366
|
+
"properties": {
|
|
367
|
+
"max": {
|
|
368
|
+
"description": "Semantic version (e.g., v1.0.0)",
|
|
369
|
+
"maxLength": 32,
|
|
370
|
+
"pattern": "^v\\d+\\.\\d+\\.\\d+$",
|
|
371
|
+
"type": "string"
|
|
372
|
+
},
|
|
373
|
+
"min": {
|
|
374
|
+
"description": "Semantic version (e.g., v1.0.0)",
|
|
375
|
+
"maxLength": 32,
|
|
376
|
+
"pattern": "^v\\d+\\.\\d+\\.\\d+$",
|
|
377
|
+
"type": "string"
|
|
378
|
+
}
|
|
379
|
+
},
|
|
380
|
+
"type": ["object", "null"]
|
|
381
|
+
},
|
|
382
|
+
"version": {
|
|
383
|
+
"description": "Semantic version (e.g., v1.0.0)",
|
|
384
|
+
"maxLength": 32,
|
|
385
|
+
"pattern": "^v\\d+\\.\\d+\\.\\d+$",
|
|
386
|
+
"type": "string"
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
"required": ["id", "name", "version", "auth", "lifecycle_callback"]
|
|
390
|
+
},
|
|
391
|
+
"runtime": {
|
|
392
|
+
"$schema": "http://json-schema.org/draft/07/schema#",
|
|
393
|
+
"type": "object",
|
|
394
|
+
"required": ["type", "healthcheck"],
|
|
395
|
+
"additionalProperties": false,
|
|
396
|
+
"properties": {
|
|
397
|
+
"type": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"enum": ["ones-node-22", "container"],
|
|
400
|
+
"description": "Runtime type: built-in ONES Node.js 22 or a custom container."
|
|
401
|
+
},
|
|
402
|
+
"healthcheck": {
|
|
403
|
+
"type": "object",
|
|
404
|
+
"required": ["path"],
|
|
405
|
+
"additionalProperties": false,
|
|
406
|
+
"properties": {
|
|
407
|
+
"path": {
|
|
408
|
+
"type": "string",
|
|
409
|
+
"maxLength": 256,
|
|
410
|
+
"pattern": "^/.*",
|
|
411
|
+
"description": "HTTP healthcheck path, must start with '/'."
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"resources": {
|
|
416
|
+
"type": "object",
|
|
417
|
+
"required": ["cpu", "memory"],
|
|
418
|
+
"additionalProperties": false,
|
|
419
|
+
"properties": {
|
|
420
|
+
"cpu": {
|
|
421
|
+
"type": "string",
|
|
422
|
+
"pattern": "^([0-9]+m|[0-9]+(\\.[0-9])?)$",
|
|
423
|
+
"description": "CPU resource value. With 'm' it must be an integer; without 'm' it can be an integer or one decimal (e.g. 500m, 1, 1.5)."
|
|
424
|
+
},
|
|
425
|
+
"memory": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"pattern": "^[0-9]+(M|G|Gi|Mi)$",
|
|
428
|
+
"description": "Memory resource value. Only M/G/Gi/Mi are supported (e.g. 256Mi, 1Gi)."
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"arch": {
|
|
433
|
+
"type": "string",
|
|
434
|
+
"enum": ["amd64", "arm64"],
|
|
435
|
+
"description": "Runtime architecture. Default is amd64."
|
|
436
|
+
},
|
|
437
|
+
"image": {
|
|
438
|
+
"type": "string",
|
|
439
|
+
"maxLength": 256,
|
|
440
|
+
"pattern": "^ones/platform-app/[a-z0-9-_]+:[a-z0-9-_.]+$",
|
|
441
|
+
"description": "Image name must start with ones/platform-app/"
|
|
442
|
+
},
|
|
443
|
+
"command": {
|
|
444
|
+
"type": "array",
|
|
445
|
+
"items": {
|
|
446
|
+
"type": "string",
|
|
447
|
+
"minLength": 1,
|
|
448
|
+
"maxLength": 1024
|
|
449
|
+
},
|
|
450
|
+
"minItems": 1,
|
|
451
|
+
"maxItems": 8,
|
|
452
|
+
"description": "Startup command array, e.g. [\"node\", \"index.js\"]."
|
|
453
|
+
},
|
|
454
|
+
"args": {
|
|
455
|
+
"type": "array",
|
|
456
|
+
"items": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"maxLength": 1024
|
|
459
|
+
},
|
|
460
|
+
"maxItems": 8,
|
|
461
|
+
"description": "Startup args array, appended to command."
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
"ones": {
|
|
466
|
+
"type": "object",
|
|
467
|
+
"additionalProperties": false,
|
|
468
|
+
"properties": {
|
|
469
|
+
"storage": {
|
|
470
|
+
"type": "object",
|
|
471
|
+
"description": "Storage configuration for entity and object storage",
|
|
472
|
+
"additionalProperties": false,
|
|
473
|
+
"properties": {
|
|
474
|
+
"entities": {
|
|
475
|
+
"type": "array",
|
|
476
|
+
"description": "Entity storage definitions",
|
|
477
|
+
"maxItems": 64,
|
|
478
|
+
"items": {
|
|
479
|
+
"type": "object",
|
|
480
|
+
"additionalProperties": false,
|
|
481
|
+
"required": ["name", "attributes"],
|
|
482
|
+
"properties": {
|
|
483
|
+
"name": {
|
|
484
|
+
"type": "string",
|
|
485
|
+
"description": "Entity name",
|
|
486
|
+
"maxLength": 32,
|
|
487
|
+
"pattern": "^[_a-z0-9]{1,32}$"
|
|
488
|
+
},
|
|
489
|
+
"attributes": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"description": "Entity attributes definition",
|
|
492
|
+
"maxProperties": 32,
|
|
493
|
+
"additionalProperties": {
|
|
494
|
+
"type": "object",
|
|
495
|
+
"additionalProperties": false,
|
|
496
|
+
"properties": {
|
|
497
|
+
"type": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"enum": ["boolean", "integer", "float", "string", "text"],
|
|
500
|
+
"description": "Attribute data type"
|
|
501
|
+
},
|
|
502
|
+
"length": {
|
|
503
|
+
"type": "integer",
|
|
504
|
+
"minimum": 1,
|
|
505
|
+
"maximum": 2048,
|
|
506
|
+
"description": "String length (required for string type)"
|
|
507
|
+
},
|
|
508
|
+
"required": {
|
|
509
|
+
"type": "boolean",
|
|
510
|
+
"description": "Whether the attribute is required"
|
|
511
|
+
},
|
|
512
|
+
"default": {
|
|
513
|
+
"description": "Default value for the attribute"
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"required": ["type"]
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
"indexes": {
|
|
520
|
+
"type": "array",
|
|
521
|
+
"description": "Custom index definitions",
|
|
522
|
+
"maxItems": 64,
|
|
523
|
+
"items": {
|
|
524
|
+
"type": "object",
|
|
525
|
+
"additionalProperties": false,
|
|
526
|
+
"required": ["name", "range_attribute"],
|
|
527
|
+
"properties": {
|
|
528
|
+
"name": {
|
|
529
|
+
"type": "string",
|
|
530
|
+
"description": "Index name",
|
|
531
|
+
"maxLength": 64,
|
|
532
|
+
"pattern": "^[_a-z0-9]{1,64}$"
|
|
533
|
+
},
|
|
534
|
+
"range_attribute": {
|
|
535
|
+
"type": "string",
|
|
536
|
+
"description": "Attribute name for range query",
|
|
537
|
+
"maxLength": 64
|
|
538
|
+
},
|
|
539
|
+
"partition": {
|
|
540
|
+
"type": "array",
|
|
541
|
+
"description": "Partition attributes",
|
|
542
|
+
"items": {
|
|
543
|
+
"type": "string",
|
|
544
|
+
"maxLength": 64
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
"unique": {
|
|
548
|
+
"type": "boolean",
|
|
549
|
+
"description": "Whether the index is unique"
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
"object": {
|
|
558
|
+
"type": "boolean",
|
|
559
|
+
"description": "Whether object storage is enabled"
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|