@giteeteam/apps-manifest 0.8.8 → 0.9.0

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.
@@ -0,0 +1,35 @@
1
+ {
2
+ "$id": "http://proxima.com/schemas/envVariables.json",
3
+ "type": "array",
4
+ "minItems": 1,
5
+ "uniqueItems": true,
6
+ "uniqueItemProperties": [
7
+ "key"
8
+ ],
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "key": {
13
+ "type": "string"
14
+ },
15
+ "type": {
16
+ "type": "string",
17
+ "enum": [
18
+ "object",
19
+ "String",
20
+ "Number",
21
+ "Boolean"
22
+ ]
23
+ },
24
+ "required": {
25
+ "type": "boolean"
26
+ }
27
+ },
28
+ "required": [
29
+ "key"
30
+ ]
31
+ },
32
+ "errorMessage": {
33
+ "uniqueItemProperties": "key must be unique"
34
+ }
35
+ }
package/lib/types.d.ts CHANGED
@@ -129,6 +129,11 @@ export interface IMessageQueue {
129
129
  endpoint: string;
130
130
  namespace?: string;
131
131
  }
132
+ export interface IEnvVariable {
133
+ key: string;
134
+ type?: string;
135
+ required?: boolean;
136
+ }
132
137
  export interface IManifest {
133
138
  app: IManifestApp;
134
139
  modules: TManifestModules;
@@ -138,4 +143,5 @@ export interface IManifest {
138
143
  dependVersion?: TDependVersion;
139
144
  storage?: IStorage;
140
145
  messageQueues?: IMessageQueue[];
146
+ envVariables?: IEnvVariable[];
141
147
  }
package/lib/validate.d.ts CHANGED
@@ -73,3 +73,10 @@ export declare const validateMessageQueues: (json: IManifest) => {
73
73
  message: string | undefined;
74
74
  }[] | null;
75
75
  };
76
+ export declare const validateEnvVariables: (json: IManifest) => {
77
+ pass: boolean;
78
+ errors: {
79
+ path: string;
80
+ message: string | undefined;
81
+ }[] | null;
82
+ };
package/lib/validate.js CHANGED
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.validateMessageQueues = exports.validateStorage = exports.validateDependVersion = exports.validateLocales = exports.validateTables = exports.validateResources = exports.validateModules = exports.validateApp = exports.validateAll = exports.validateScheduledTrigger = exports.validateWorkspacePage = void 0;
6
+ exports.validateEnvVariables = exports.validateMessageQueues = exports.validateStorage = exports.validateDependVersion = exports.validateLocales = exports.validateTables = exports.validateResources = exports.validateModules = exports.validateApp = exports.validateAll = exports.validateScheduledTrigger = exports.validateWorkspacePage = void 0;
7
7
  const ajv_1 = __importDefault(require("ajv"));
8
8
  const ajv_keywords_1 = __importDefault(require("ajv-keywords"));
9
9
  const ajv_errors_1 = __importDefault(require("ajv-errors"));
@@ -31,6 +31,7 @@ const condition_json_1 = __importDefault(require("./schema/modules/proxima-workf
31
31
  const validator_json_1 = __importDefault(require("./schema/modules/proxima-workflow/validator.json"));
32
32
  const post_function_json_1 = __importDefault(require("./schema/modules/proxima-workflow/post-function.json"));
33
33
  const resource_json_1 = __importDefault(require("./schema/modules/proxima-workflow/resource.json"));
34
+ const envVariables_json_1 = __importDefault(require("./schema/envVariables.json"));
34
35
  const validateResource = (json) => {
35
36
  const errors = [];
36
37
  const frontendModules = ['adminPage', 'itemPanel', 'itemActivity', 'appPage'];
@@ -116,6 +117,7 @@ const validateFactory = (schema) => {
116
117
  validator_json_1.default,
117
118
  post_function_json_1.default,
118
119
  resource_json_1.default,
120
+ envVariables_json_1.default,
119
121
  ],
120
122
  });
121
123
  (0, ajv_keywords_1.default)(ajv);
@@ -229,3 +231,4 @@ exports.validateLocales = validateFactory(locales_json_1.default);
229
231
  exports.validateDependVersion = validateFactory(dependVersion_json_1.default);
230
232
  exports.validateStorage = validateFactory(storage_json_1.default);
231
233
  exports.validateMessageQueues = validateFactory(messageQueues_json_1.default);
234
+ exports.validateEnvVariables = validateFactory(envVariables_json_1.default);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@giteeteam/apps-manifest",
3
- "version": "0.8.8",
3
+ "version": "0.9.0",
4
4
  "description": "Giteeteam Apps Manifest",
5
5
  "keywords": [
6
6
  "typescript",
@@ -41,12 +41,12 @@
41
41
  "ajv-keywords": "^5.0.0",
42
42
  "cron": "^3.1.6",
43
43
  "lodash": "^4.17.21",
44
- "yaml": "^2.1.1"
44
+ "yaml": "^2.8.2"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/lodash": "^4.14.195",
48
48
  "@vitest/coverage-v8": "^2.1.3",
49
- "typescript": "^5.7.2",
49
+ "typescript": "^5.9.2",
50
50
  "vitest": "^2.1.3"
51
51
  }
52
52
  }