@forge/manifest 4.7.1-next.0-experimental-58938ba → 4.7.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/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @forge/manifest
2
2
 
3
- ## 4.7.1-next.0-experimental-58938ba
3
+ ## 4.7.1
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - 23a89df6: Update manifest definitions
7
+ - 23a89df: Update manifest definitions
8
8
 
9
9
  ## 4.7.1-next.0
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAkBvF"}
1
+ {"version":3,"file":"full-validation-processor.d.ts","sourceRoot":"","sources":["../../src/processor/full-validation-processor.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,qBAAa,uBAAwB,SAAQ,2BAA2B,CAAC,cAAc,CAAC;;CAiBvF"}
@@ -6,7 +6,6 @@ const validators_1 = require("../validators");
6
6
  const FULL_SCHEMA = tslib_1.__importStar(require("../schema/manifest-schema.json"));
7
7
  const DISPLAY_CONDITIONS_SCHEMA = tslib_1.__importStar(require("../schema/display-conditions-schema.json"));
8
8
  const abstract_validation_processor_1 = require("./abstract-validation-processor");
9
- const storage_validator_1 = require("../validators/storage-validator");
10
9
  class FullValidationProcessor extends abstract_validation_processor_1.AbstractValidationProcessor {
11
10
  constructor() {
12
11
  super([
@@ -19,7 +18,6 @@ class FullValidationProcessor extends abstract_validation_processor_1.AbstractVa
19
18
  new validators_1.ConnectRemoteValidator(),
20
19
  new validators_1.ConnectAuthenticationValidator(),
21
20
  new validators_1.PermissionsValidator(),
22
- new storage_validator_1.StorageValidator(),
23
21
  new validators_1.DisplayConditionsValidator(DISPLAY_CONDITIONS_SCHEMA),
24
22
  new validators_1.ProvidersValidator(),
25
23
  new validators_1.EntityPropertyValidator()
@@ -82,8 +82,11 @@
82
82
  }
83
83
  },
84
84
  "storage": {
85
- "type": "object",
86
85
  "description": "Options related to hosted storage",
86
+ "type": "object",
87
+ "required": [
88
+ "classifications"
89
+ ],
87
90
  "additionalProperties": false,
88
91
  "properties": {
89
92
  "classifications": {
@@ -98,95 +101,6 @@
98
101
  ]
99
102
  },
100
103
  "minItems": 1
101
- },
102
- "entities": {
103
- "description": "Custom schemas for app stored entities.",
104
- "type": "array",
105
- "items": {
106
- "type": "object",
107
- "required": [
108
- "name",
109
- "attributes"
110
- ],
111
- "additionalProperties": false,
112
- "properties": {
113
- "name": {
114
- "description": "A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.",
115
- "type": "string",
116
- "pattern": "^[a-z]+$",
117
- "minLength": 3,
118
- "maxLength": 60
119
- },
120
- "attributes": {
121
- "description": "Attributes of the entity.",
122
- "type": "object",
123
- "patternProperties": {
124
- "^[a-zA-Z][a-zA-Z0-9_]*$": {
125
- "description": "An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.",
126
- "type": "object",
127
- "required": [
128
- "type"
129
- ],
130
- "additionalProperties": false,
131
- "properties": {
132
- "type": {
133
- "description": "The data type for the given attribute.",
134
- "type": "string",
135
- "enum": [
136
- "string",
137
- "boolean",
138
- "float",
139
- "integer",
140
- "any"
141
- ]
142
- }
143
- }
144
- }
145
- },
146
- "additionalProperties": false
147
- },
148
- "indexes": {
149
- "description": "Indexes on attributes of the schema.",
150
- "type": "array",
151
- "items": {
152
- "oneOf": [
153
- {
154
- "type": "string"
155
- },
156
- {
157
- "type": "object",
158
- "required": [
159
- "name",
160
- "range"
161
- ],
162
- "additionalProperties": false,
163
- "properties": {
164
- "name": {
165
- "type": "string"
166
- },
167
- "range": {
168
- "type": "array",
169
- "items": {
170
- "type": "string"
171
- },
172
- "minItems": 1
173
- },
174
- "partition": {
175
- "type": "array",
176
- "items": {
177
- "type": "string"
178
- },
179
- "minItems": 1
180
- }
181
- }
182
- }
183
- ]
184
- },
185
- "minItems": 1
186
- }
187
- }
188
- },
189
- "minItems": 1
190
104
  }
191
105
  }
192
106
  }
@@ -43,100 +43,7 @@ export interface App {
43
43
  /**
44
44
  * Labels to classify the type of data stored
45
45
  */
46
- classifications?: ['ugc' | 'pii' | 'other', ...('ugc' | 'pii' | 'other')[]];
47
- /**
48
- * Custom schemas for app stored entities.
49
- */
50
- entities?: [
51
- {
52
- /**
53
- * A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.
54
- */
55
- name: string;
56
- /**
57
- * Attributes of the entity.
58
- */
59
- attributes: {
60
- /**
61
- * An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.
62
- *
63
- * This interface was referenced by `undefined`'s JSON-Schema definition
64
- * via the `patternProperty` "^[a-zA-Z][a-zA-Z0-9_]*$".
65
- */
66
- [k: string]: {
67
- /**
68
- * The data type for the given attribute.
69
- */
70
- type: 'string' | 'boolean' | 'float' | 'integer' | 'any';
71
- };
72
- };
73
- /**
74
- * Indexes on attributes of the schema.
75
- */
76
- indexes?: [
77
- (
78
- | string
79
- | {
80
- name: string;
81
- range: [string, ...string[]];
82
- partition?: [string, ...string[]];
83
- }
84
- ),
85
- ...(
86
- | string
87
- | {
88
- name: string;
89
- range: [string, ...string[]];
90
- partition?: [string, ...string[]];
91
- }
92
- )[]
93
- ];
94
- },
95
- ...{
96
- /**
97
- * A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.
98
- */
99
- name: string;
100
- /**
101
- * Attributes of the entity.
102
- */
103
- attributes: {
104
- /**
105
- * An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.
106
- *
107
- * This interface was referenced by `undefined`'s JSON-Schema definition
108
- * via the `patternProperty` "^[a-zA-Z][a-zA-Z0-9_]*$".
109
- */
110
- [k: string]: {
111
- /**
112
- * The data type for the given attribute.
113
- */
114
- type: 'string' | 'boolean' | 'float' | 'integer' | 'any';
115
- };
116
- };
117
- /**
118
- * Indexes on attributes of the schema.
119
- */
120
- indexes?: [
121
- (
122
- | string
123
- | {
124
- name: string;
125
- range: [string, ...string[]];
126
- partition?: [string, ...string[]];
127
- }
128
- ),
129
- ...(
130
- | string
131
- | {
132
- name: string;
133
- range: [string, ...string[]];
134
- partition?: [string, ...string[]];
135
- }
136
- )[]
137
- ];
138
- }[]
139
- ];
46
+ classifications: ['ugc' | 'pii' | 'other', ...('ugc' | 'pii' | 'other')[]];
140
47
  };
141
48
  }
142
49
  /**
@@ -82,8 +82,11 @@
82
82
  }
83
83
  },
84
84
  "storage": {
85
- "type": "object",
86
85
  "description": "Options related to hosted storage",
86
+ "type": "object",
87
+ "required": [
88
+ "classifications"
89
+ ],
87
90
  "additionalProperties": false,
88
91
  "properties": {
89
92
  "classifications": {
@@ -98,95 +101,6 @@
98
101
  ]
99
102
  },
100
103
  "minItems": 1
101
- },
102
- "entities": {
103
- "description": "Custom schemas for app stored entities.",
104
- "type": "array",
105
- "items": {
106
- "type": "object",
107
- "required": [
108
- "name",
109
- "attributes"
110
- ],
111
- "additionalProperties": false,
112
- "properties": {
113
- "name": {
114
- "description": "A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.",
115
- "type": "string",
116
- "pattern": "^[a-z]+$",
117
- "minLength": 3,
118
- "maxLength": 60
119
- },
120
- "attributes": {
121
- "description": "Attributes of the entity.",
122
- "type": "object",
123
- "patternProperties": {
124
- "^[a-zA-Z][a-zA-Z0-9_]*$": {
125
- "description": "An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.",
126
- "type": "object",
127
- "required": [
128
- "type"
129
- ],
130
- "additionalProperties": false,
131
- "properties": {
132
- "type": {
133
- "description": "The data type for the given attribute.",
134
- "type": "string",
135
- "enum": [
136
- "string",
137
- "boolean",
138
- "float",
139
- "integer",
140
- "any"
141
- ]
142
- }
143
- }
144
- }
145
- },
146
- "additionalProperties": false
147
- },
148
- "indexes": {
149
- "description": "Indexes on attributes of the schema.",
150
- "type": "array",
151
- "items": {
152
- "oneOf": [
153
- {
154
- "type": "string"
155
- },
156
- {
157
- "type": "object",
158
- "required": [
159
- "name",
160
- "range"
161
- ],
162
- "additionalProperties": false,
163
- "properties": {
164
- "name": {
165
- "type": "string"
166
- },
167
- "range": {
168
- "type": "array",
169
- "items": {
170
- "type": "string"
171
- },
172
- "minItems": 1
173
- },
174
- "partition": {
175
- "type": "array",
176
- "items": {
177
- "type": "string"
178
- },
179
- "minItems": 1
180
- }
181
- }
182
- }
183
- ]
184
- },
185
- "minItems": 1
186
- }
187
- }
188
- },
189
- "minItems": 1
190
104
  }
191
105
  }
192
106
  }
@@ -223,100 +223,7 @@ export interface App {
223
223
  /**
224
224
  * Labels to classify the type of data stored
225
225
  */
226
- classifications?: ['ugc' | 'pii' | 'other', ...('ugc' | 'pii' | 'other')[]];
227
- /**
228
- * Custom schemas for app stored entities.
229
- */
230
- entities?: [
231
- {
232
- /**
233
- * A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.
234
- */
235
- name: string;
236
- /**
237
- * Attributes of the entity.
238
- */
239
- attributes: {
240
- /**
241
- * An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.
242
- *
243
- * This interface was referenced by `undefined`'s JSON-Schema definition
244
- * via the `patternProperty` "^[a-zA-Z][a-zA-Z0-9_]*$".
245
- */
246
- [k: string]: {
247
- /**
248
- * The data type for the given attribute.
249
- */
250
- type: 'string' | 'boolean' | 'float' | 'integer' | 'any';
251
- };
252
- };
253
- /**
254
- * Indexes on attributes of the schema.
255
- */
256
- indexes?: [
257
- (
258
- | string
259
- | {
260
- name: string;
261
- range: [string, ...string[]];
262
- partition?: [string, ...string[]];
263
- }
264
- ),
265
- ...(
266
- | string
267
- | {
268
- name: string;
269
- range: [string, ...string[]];
270
- partition?: [string, ...string[]];
271
- }
272
- )[]
273
- ];
274
- },
275
- ...{
276
- /**
277
- * A name for the entity. Must be unique within the manifest and have a maximum of 60 characters.
278
- */
279
- name: string;
280
- /**
281
- * Attributes of the entity.
282
- */
283
- attributes: {
284
- /**
285
- * An attribute of the entity. Must be unique within the entity and have a maximum of 30 characters.
286
- *
287
- * This interface was referenced by `undefined`'s JSON-Schema definition
288
- * via the `patternProperty` "^[a-zA-Z][a-zA-Z0-9_]*$".
289
- */
290
- [k: string]: {
291
- /**
292
- * The data type for the given attribute.
293
- */
294
- type: 'string' | 'boolean' | 'float' | 'integer' | 'any';
295
- };
296
- };
297
- /**
298
- * Indexes on attributes of the schema.
299
- */
300
- indexes?: [
301
- (
302
- | string
303
- | {
304
- name: string;
305
- range: [string, ...string[]];
306
- partition?: [string, ...string[]];
307
- }
308
- ),
309
- ...(
310
- | string
311
- | {
312
- name: string;
313
- range: [string, ...string[]];
314
- partition?: [string, ...string[]];
315
- }
316
- )[]
317
- ];
318
- }[]
319
- ];
226
+ classifications: ['ugc' | 'pii' | 'other', ...('ugc' | 'pii' | 'other')[]];
320
227
  };
321
228
  }
322
229
  /**
@@ -104,19 +104,6 @@ export declare const errors: {
104
104
  missingAppConnectRemote: () => string;
105
105
  missingRemoteForConnect: (key: string) => string;
106
106
  missingConnectModules: () => string;
107
- storage: {
108
- missingStorageInformation: () => string;
109
- entities: {
110
- entityNameTooLong: (entity: string, limit: number) => string;
111
- missingAttributes: (entity: string) => string;
112
- tooManyAttributes: (entity: string, limit: number) => string;
113
- attributeNameTooLong: (entity: string, attribute: string, limit: number) => string;
114
- tooManyIndexes: (entity: string, limit: number) => string;
115
- invalidIndexRange: (entity: string, index: string) => string;
116
- invalidIndexPartition: (entity: string, partition: string) => string;
117
- reservedIndexName: (entity: string, index: string) => string;
118
- };
119
- };
120
107
  };
121
108
  };
122
109
  export declare enum References {
@@ -1 +1 @@
1
- {"version":3,"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M,eAAe,MAAM,KAAG,MAAM;;;uCAI1C,MAAM;uCAEJ,MAAM,KAAG,MAAM;qCAEnB,MAAM;;CAGpC,CAAC;AAEF,oBAAY,UAAU;IACpB,eAAe,2BAA2B;IAC1C,eAAe,wBAAwB;IACvC,WAAW,4BAA4B;IACvC,WAAW,+BAA+B;IAC1C,aAAa,8BAA8B;IAC3C,OAAO,0BAA0B;IACjC,cAAc,kCAAkC;IAChD,mBAAmB,0BAA0B;IAC7C,SAAS,4BAA4B;IACrC,SAAS,4BAA4B;IACrC,UAAU,wBAAwB;IAClC,GAAG,8BAA8B;CAClC"}
@@ -117,20 +117,7 @@ exports.errors = {
117
117
  app: {
118
118
  missingAppConnectRemote: () => `missing app.connect.remote. app.connect.remote is required if connectModules are present.`,
119
119
  missingRemoteForConnect: (key) => `no remote found with key '${key}' matching app.connect.remote value.`,
120
- missingConnectModules: () => 'Missing connectModules. When app.connect.authentication is present, connectModules is required.',
121
- storage: {
122
- missingStorageInformation: () => 'Missing storage configuration. When app.storage is present, either entities or classifications is required.',
123
- entities: {
124
- entityNameTooLong: (entity, limit) => `Entity name '${entity}' exceeds maximum allowed length of ${limit} characters.`,
125
- missingAttributes: (entity) => `Entity '${entity}' must contain at least one attribute`,
126
- tooManyAttributes: (entity, limit) => `Entity '${entity}' contains more attributes than the allowed limit of ${limit}`,
127
- attributeNameTooLong: (entity, attribute, limit) => `Entity '${entity}' attribute name '${attribute}' exceeds maximum allowed length of ${limit}.`,
128
- tooManyIndexes: (entity, limit) => `Entity '${entity}' contains more indexes than the allowed limit of ${limit}`,
129
- invalidIndexRange: (entity, index) => `Entity '${entity}' index '${index}' must refer to a valid attribute of the entity`,
130
- invalidIndexPartition: (entity, partition) => `Entity '${entity}' index partition '${partition}' must refer to a valid attribute of the entity`,
131
- reservedIndexName: (entity, index) => `Entity '${entity}' cannot use reserved index name '${index}'`
132
- }
133
- }
120
+ missingConnectModules: () => 'Missing connectModules. When app.connect.authentication is present, connectModules is required.'
134
121
  }
135
122
  };
136
123
  var References;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/manifest",
3
- "version": "4.7.1-next.0-experimental-58938ba",
3
+ "version": "4.7.1",
4
4
  "description": "Definitions and validations of the Forge manifest",
5
5
  "main": "out/index.js",
6
6
  "scripts": {
@@ -1,11 +0,0 @@
1
- import { ValidatorInterface } from './validator-interface';
2
- import { ManifestObject, ManifestValidationResult } from '../types';
3
- import { ManifestSchema } from '../schema/manifest';
4
- export declare class StorageValidator implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
5
- private entityAttributeMaxLength;
6
- private entityAttributesMaxCount;
7
- private entityIndexesMaxCount;
8
- private reservedIndexName;
9
- validate(manifest: ManifestObject<ManifestSchema> | undefined): Promise<ManifestValidationResult<ManifestSchema>>;
10
- }
11
- //# sourceMappingURL=storage-validator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"storage-validator.d.ts","sourceRoot":"","sources":["../../src/validators/storage-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,qBAAa,gBACX,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IACzF,OAAO,CAAC,wBAAwB,CAAM;IACtC,OAAO,CAAC,wBAAwB,CAAM;IACtC,OAAO,CAAC,qBAAqB,CAAK;IAClC,OAAO,CAAC,iBAAiB,CAAY;IAE/B,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA+IrD"}
@@ -1,89 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StorageValidator = void 0;
4
- const text_1 = require("../text");
5
- const utils_1 = require("../utils");
6
- class StorageValidator {
7
- constructor() {
8
- this.entityAttributeMaxLength = 30;
9
- this.entityAttributesMaxCount = 50;
10
- this.entityIndexesMaxCount = 5;
11
- this.reservedIndexName = 'by-key';
12
- }
13
- async validate(manifest) {
14
- var _a, _b;
15
- if (!((_b = (_a = manifest === null || manifest === void 0 ? void 0 : manifest.typedContent) === null || _a === void 0 ? void 0 : _a.app) === null || _b === void 0 ? void 0 : _b.storage)) {
16
- return {
17
- success: true,
18
- manifestObject: manifest
19
- };
20
- }
21
- const validationErrors = [];
22
- if (!manifest.typedContent.app.storage.classifications && !manifest.typedContent.app.storage.entities) {
23
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.missingStorageInformation(), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('storage', manifest.yamlContentByLine)));
24
- }
25
- if (!manifest.typedContent.app.storage.entities) {
26
- return {
27
- success: true,
28
- manifestObject: manifest
29
- };
30
- }
31
- const entities = manifest.typedContent.app.storage.entities;
32
- entities.forEach((entity) => {
33
- const { name, attributes } = entity;
34
- if (!Object.keys(attributes).length) {
35
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.missingAttributes(name), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
36
- }
37
- else {
38
- if (Object.keys(attributes).length > this.entityAttributesMaxCount) {
39
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.tooManyAttributes(name, this.entityAttributesMaxCount), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
40
- }
41
- Object.keys(attributes).forEach((attributeKey) => {
42
- if (attributeKey.length > this.entityAttributeMaxLength) {
43
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.attributeNameTooLong(name, attributeKey, this.entityAttributeMaxLength), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
44
- }
45
- });
46
- }
47
- if (entity.indexes) {
48
- const { indexes } = entity;
49
- if (indexes.length > this.entityIndexesMaxCount) {
50
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.tooManyIndexes(name, this.entityIndexesMaxCount), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
51
- }
52
- const indexName = [];
53
- const indexRange = [];
54
- const indexPartition = [];
55
- indexes.forEach((index) => {
56
- if (typeof index === 'string') {
57
- indexRange.push(index);
58
- }
59
- else if (typeof index === 'object') {
60
- indexName.push(index.name);
61
- indexRange.push(...index.range);
62
- if (index.partition) {
63
- indexPartition.push(...index.partition);
64
- }
65
- }
66
- });
67
- if (indexName.find((name) => name === this.reservedIndexName)) {
68
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.reservedIndexName(name, this.reservedIndexName), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
69
- }
70
- indexRange.forEach((range) => {
71
- if (!Object.keys(attributes).length || !attributes[range]) {
72
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.invalidIndexRange(name, range), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
73
- }
74
- });
75
- indexPartition.forEach((partition) => {
76
- if (!Object.keys(attributes).length || !attributes[partition]) {
77
- validationErrors.push(Object.assign({ message: text_1.errors.app.storage.entities.invalidIndexPartition(name, partition), reference: text_1.References.App, level: 'error' }, (0, utils_1.findPosition)('entities', manifest.yamlContentByLine)));
78
- }
79
- });
80
- }
81
- });
82
- return {
83
- success: validationErrors.length === 0,
84
- manifestObject: manifest,
85
- errors: validationErrors
86
- };
87
- }
88
- }
89
- exports.StorageValidator = StorageValidator;