@prismatic-io/spectral 10.6.1 → 10.6.2
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/dist/generators/componentManifest/getInputs.js +2 -1
- package/dist/generators/componentManifest/templates/actions/action.ts.ejs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/serverTypes/asyncContext.js +7 -2
- package/dist/serverTypes/index.d.ts +1 -0
- package/dist/serverTypes/index.js +15 -0
- package/package.json +1 -1
|
@@ -24,7 +24,8 @@ const getInputs = ({ inputs, docBlock = docBlock_1.DOC_BLOCK_DEFAULT }) => {
|
|
|
24
24
|
label: input.label,
|
|
25
25
|
inputType: input.type,
|
|
26
26
|
valueType: getInputValueType(input),
|
|
27
|
-
required: input.required &&
|
|
27
|
+
required: input.required &&
|
|
28
|
+
(input.default === undefined || input.default === null || input.default === ""),
|
|
28
29
|
collection: input.collection,
|
|
29
30
|
onPremControlled: input.onPremiseControlled || input.onPremControlled,
|
|
30
31
|
docBlock: docBlock(input),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<%- include('../partials/generatedHeader.ejs') -%>
|
|
2
2
|
<%- include('../partials/imports.ejs', { imports, helpers }) %>
|
|
3
|
-
import { requireContext } from "@prismatic-io/spectral";
|
|
3
|
+
import { requireContext } from "@prismatic-io/spectral/dist/serverTypes";
|
|
4
4
|
|
|
5
5
|
export interface <%= action.typeInterface %>Values {
|
|
6
6
|
<%- include('../partials/performArgs.ejs', { inputs: action.inputs, helpers }) -%>
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -237,4 +237,3 @@ __exportStar(require("./types"), exports);
|
|
|
237
237
|
var testing_1 = require("./testing");
|
|
238
238
|
Object.defineProperty(exports, "testing", { enumerable: true, get: function () { return __importDefault(testing_1).default; } });
|
|
239
239
|
__exportStar(require("./errors"), exports);
|
|
240
|
-
__exportStar(require("./serverTypes/asyncContext"), exports);
|
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runWithContext = runWithContext;
|
|
4
4
|
exports.requireContext = requireContext;
|
|
5
|
-
|
|
6
|
-
const
|
|
5
|
+
// Only import async_hooks in Node.js environments
|
|
6
|
+
const asyncHooks = typeof window === "undefined" ? require("node:async_hooks") : null;
|
|
7
|
+
const actionContextStorage = asyncHooks ? new asyncHooks.AsyncLocalStorage() : null;
|
|
7
8
|
function runWithContext(context, fn) {
|
|
9
|
+
if (!actionContextStorage) {
|
|
10
|
+
// This shouldn't be running in a browser environment anyway.
|
|
11
|
+
return fn();
|
|
12
|
+
}
|
|
8
13
|
return actionContextStorage.run(context, fn);
|
|
9
14
|
}
|
|
10
15
|
function requireContext() {
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* Types used to describe the format the platform expects for
|
|
3
3
|
* component and integration definitions. */
|
|
4
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
+
if (k2 === undefined) k2 = k;
|
|
6
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
+
}
|
|
10
|
+
Object.defineProperty(o, k2, desc);
|
|
11
|
+
}) : (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
o[k2] = m[k];
|
|
14
|
+
}));
|
|
15
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
16
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
17
|
+
};
|
|
4
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
19
|
exports.OAuth2Type = void 0;
|
|
6
20
|
var OAuth2Type;
|
|
@@ -8,3 +22,4 @@ var OAuth2Type;
|
|
|
8
22
|
OAuth2Type["ClientCredentials"] = "client_credentials";
|
|
9
23
|
OAuth2Type["AuthorizationCode"] = "authorization_code";
|
|
10
24
|
})(OAuth2Type || (exports.OAuth2Type = OAuth2Type = {}));
|
|
25
|
+
__exportStar(require("./asyncContext"), exports);
|