@prismatic-io/spectral 10.21.1-preview.0 → 10.21.1-preview.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.
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  * on publish — the converted server component `prism component publish` sends.
18
18
  *
19
19
  * Scope is conversion output only: which fields land on the wire, with what values.
20
- * It does not verify runtime dispatch (SAFE vs. UNSAFE vs. NOT_ALLOWED choosing
20
+ * It does not verify runtime dispatch (SAFE vs. NOT_ALLOWED choosing
21
21
  * which perform runs) — the safety flags are inert metadata spectral passes through
22
22
  * verbatim, and the runner decides at execution time.
23
23
  */
@@ -69,7 +69,7 @@ const testComponent = (0, index_1.component)({
69
69
  display: display("Runnable Perform Action"),
70
70
  inputs: sharedInputs,
71
71
  perform: noop,
72
- performSafety: index_1.PerformSafety.UNSAFE,
72
+ performSafety: index_1.PerformSafety.SAFE,
73
73
  }),
74
74
  // D — real perform marked not runnable.
75
75
  notAllowedPerformAction: (0, index_1.action)({
@@ -100,9 +100,9 @@ const actionsByKey = testComponent.actions;
100
100
  const result = yield ((_a = a.examplePerform) === null || _a === void 0 ? void 0 : _a.call(a, {}, { tags: ["x"] }));
101
101
  (0, vitest_1.expect)(result.data.tags).toStrictEqual(["x"]);
102
102
  }));
103
- (0, vitest_1.it)("C — real-perform UNSAFE flag carried; no separate example perform", () => {
103
+ (0, vitest_1.it)("C — real-perform SAFE flag carried; no separate example perform", () => {
104
104
  const a = actionsByKey.runnablePerformAction;
105
- (0, vitest_1.expect)(a.performSafety).toBe("UNSAFE");
105
+ (0, vitest_1.expect)(a.performSafety).toBe("SAFE");
106
106
  (0, vitest_1.expect)("examplePerform" in a).toBe(false);
107
107
  (0, vitest_1.expect)(a.examplePerformSafety).toBeUndefined();
108
108
  });
@@ -143,10 +143,10 @@ const actionsByKey = testComponent.actions;
143
143
  (0, vitest_1.it)("emits both *Safety scalars when present", () => __awaiter(void 0, void 0, void 0, function* () {
144
144
  const out = yield render({
145
145
  examplePerformSafety: "SAFE",
146
- performSafety: "UNSAFE",
146
+ performSafety: "NOT_ALLOWED",
147
147
  });
148
148
  (0, vitest_1.expect)(out).toContain('examplePerformSafety: "SAFE"');
149
- (0, vitest_1.expect)(out).toContain('performSafety: "UNSAFE"');
149
+ (0, vitest_1.expect)(out).toContain('performSafety: "NOT_ALLOWED"');
150
150
  }));
151
151
  (0, vitest_1.it)("emits a NOT_ALLOWED performSafety scalar verbatim", () => __awaiter(void 0, void 0, void 0, function* () {
152
152
  const out = yield render({ performSafety: "NOT_ALLOWED" });
@@ -160,7 +160,7 @@ const actionsByKey = testComponent.actions;
160
160
  (0, vitest_1.it)("never emits an examplePerform stub (invoked via the server action, not the manifest)", () => __awaiter(void 0, void 0, void 0, function* () {
161
161
  const out = yield render({
162
162
  examplePerformSafety: "SAFE",
163
- performSafety: "UNSAFE",
163
+ performSafety: "NOT_ALLOWED",
164
164
  });
165
165
  (0, vitest_1.expect)(out).not.toContain("examplePerform:");
166
166
  }));
@@ -6,11 +6,10 @@ import type { ConfigVarResultCollection, Inputs } from "./Inputs";
6
6
  import type { OutputSchema } from "./OutputSchema";
7
7
  /**
8
8
  * Whether a perform is safe to invoke inline (to populate reference data in the Prismatic UI):
9
- * `SAFE` to run as-is, `UNSAFE` if running has side effects, `NOT_ALLOWED` to opt out.
9
+ * `SAFE` to run as-is, `NOT_ALLOWED` to opt out.
10
10
  */
11
11
  export declare const PerformSafety: {
12
12
  readonly SAFE: "SAFE";
13
- readonly UNSAFE: "UNSAFE";
14
13
  readonly NOT_ALLOWED: "NOT_ALLOWED";
15
14
  };
16
15
  export type PerformSafety = (typeof PerformSafety)[keyof typeof PerformSafety];
@@ -3,10 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PerformSafety = void 0;
4
4
  /**
5
5
  * Whether a perform is safe to invoke inline (to populate reference data in the Prismatic UI):
6
- * `SAFE` to run as-is, `UNSAFE` if running has side effects, `NOT_ALLOWED` to opt out.
6
+ * `SAFE` to run as-is, `NOT_ALLOWED` to opt out.
7
7
  */
8
8
  exports.PerformSafety = {
9
9
  SAFE: "SAFE",
10
- UNSAFE: "UNSAFE",
11
10
  NOT_ALLOWED: "NOT_ALLOWED",
12
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prismatic-io/spectral",
3
- "version": "10.21.1-preview.0",
3
+ "version": "10.21.1-preview.1",
4
4
  "description": "Utility library for building Prismatic connectors and code-native integrations",
5
5
  "keywords": [
6
6
  "prismatic"