@commercetools/cli-topic-integration-layer 0.8.0 → 0.10.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.
- package/README.md +1 -1
- package/dist/commands/integration-layer/extension/invoke-api-extension.d.ts +13 -4
- package/dist/commands/integration-layer/extension/invoke-api-extension.js +81 -36
- package/dist/commands/integration-layer/extension/invoke-api-extension.js.map +1 -1
- package/dist/commands/integration-layer/extension/serve-api-extension.d.ts +35 -0
- package/dist/commands/integration-layer/extension/serve-api-extension.js +379 -0
- package/dist/commands/integration-layer/extension/serve-api-extension.js.map +1 -0
- package/dist/commands/integration-layer/extension/serve.js +6 -0
- package/dist/commands/integration-layer/extension/serve.js.map +1 -1
- package/dist/lib/apiExtensionServer.d.ts +22 -0
- package/dist/lib/apiExtensionServer.js +97 -0
- package/dist/lib/apiExtensionServer.js.map +1 -0
- package/dist/lib/ctExtensions.d.ts +102 -0
- package/dist/lib/ctExtensions.js +162 -0
- package/dist/lib/ctExtensions.js.map +1 -0
- package/dist/lib/ilClient.d.ts +28 -0
- package/dist/lib/ilClient.js +37 -0
- package/dist/lib/ilClient.js.map +1 -1
- package/dist/lib/tooling/apiExtensionDispatch.d.ts +32 -0
- package/dist/lib/tooling/apiExtensionDispatch.js +71 -0
- package/dist/lib/tooling/apiExtensionDispatch.js.map +1 -0
- package/dist/lib/tooling/build.d.ts +6 -1
- package/dist/lib/tooling/build.js +22 -5
- package/dist/lib/tooling/build.js.map +1 -1
- package/dist/lib/tooling/loadBundle.js +13 -3
- package/dist/lib/tooling/loadBundle.js.map +1 -1
- package/dist/lib/tooling/nodeHttpShim.d.ts +73 -0
- package/dist/lib/tooling/nodeHttpShim.js +266 -0
- package/dist/lib/tooling/nodeHttpShim.js.map +1 -0
- package/dist/lib/tooling/staticAnalysis.js +13 -2
- package/dist/lib/tooling/staticAnalysis.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import { Readable } from "node:stream";
|
|
3
|
+
/** The one mediated network capability the shim routes every request through. */
|
|
4
|
+
type FetchImpl = typeof fetch;
|
|
5
|
+
/** The `{ http, https }` pair returned to the bundle's `require`. */
|
|
6
|
+
export interface NodeHttpShims {
|
|
7
|
+
http: NodeHttpModule;
|
|
8
|
+
https: NodeHttpModule;
|
|
9
|
+
}
|
|
10
|
+
interface NodeHttpModule {
|
|
11
|
+
request: (...args: unknown[]) => ClientRequestShim;
|
|
12
|
+
get: (...args: unknown[]) => ClientRequestShim;
|
|
13
|
+
/** An inert Agent: `new https.Agent()` works and its methods are no-ops, so SDK
|
|
14
|
+
* code that constructs one and later calls `.destroy()`/`.getName()` doesn't
|
|
15
|
+
* throw — but it carries no pooling or TLS config. Constructing one warns once. */
|
|
16
|
+
Agent: new (options?: unknown) => AgentShim;
|
|
17
|
+
globalAgent: AgentShim;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* An inert stand-in for Node's `http.Agent`. Every member is a no-op or empty
|
|
21
|
+
* default so SDK code that pokes at an agent runs without throwing — there is no
|
|
22
|
+
* real connection pool behind it (each request is an independent gated fetch).
|
|
23
|
+
* Constructing one via the public `Agent` warns; `globalAgent` is built directly.
|
|
24
|
+
*/
|
|
25
|
+
declare class AgentShim {
|
|
26
|
+
maxSockets: number;
|
|
27
|
+
maxFreeSockets: number;
|
|
28
|
+
sockets: Record<string, unknown>;
|
|
29
|
+
freeSockets: Record<string, unknown>;
|
|
30
|
+
requests: Record<string, unknown>;
|
|
31
|
+
options: Record<string, unknown>;
|
|
32
|
+
destroy(): void;
|
|
33
|
+
getName(): string;
|
|
34
|
+
addRequest(): void;
|
|
35
|
+
createConnection(): void;
|
|
36
|
+
createSocket(): void;
|
|
37
|
+
keepSocketAlive(): boolean;
|
|
38
|
+
reuseSocket(): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A `ClientRequest`-like writable. Body chunks are buffered by `write`; `end`
|
|
42
|
+
* dispatches ONE gated `fetch` and, once it resolves, emits `'response'` with the
|
|
43
|
+
* adapted readable (and invokes the request callback). A gate refusal or transport
|
|
44
|
+
* failure surfaces as an `'error'` event.
|
|
45
|
+
*/
|
|
46
|
+
declare class ClientRequestShim extends EventEmitter {
|
|
47
|
+
private readonly target;
|
|
48
|
+
private readonly method;
|
|
49
|
+
private readonly fetchImpl;
|
|
50
|
+
private readonly chunks;
|
|
51
|
+
private readonly controller;
|
|
52
|
+
private headers;
|
|
53
|
+
private sent;
|
|
54
|
+
private destroyed;
|
|
55
|
+
private timeoutMs?;
|
|
56
|
+
constructor(target: string, method: string, headers: Record<string, string>, fetchImpl: FetchImpl, callback?: (res: Readable) => void);
|
|
57
|
+
setHeader(name: string, value: unknown): this;
|
|
58
|
+
getHeader(name: string): string | undefined;
|
|
59
|
+
removeHeader(name: string): void;
|
|
60
|
+
setTimeout(ms: number, callback?: () => void): this;
|
|
61
|
+
write(chunk: string | Uint8Array, encoding?: unknown, callback?: () => void): boolean;
|
|
62
|
+
end(chunk?: string | Uint8Array | (() => void), encoding?: unknown, callback?: () => void): this;
|
|
63
|
+
destroy(error?: Error): this;
|
|
64
|
+
abort(): void;
|
|
65
|
+
private send;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Build the `{ http, https }` module pair, each backed by the given gated `fetch`.
|
|
69
|
+
* `http` and `https` differ only in the default protocol applied when a request is
|
|
70
|
+
* described by an options object rather than a full URL.
|
|
71
|
+
*/
|
|
72
|
+
export declare function createNodeHttpShims(fetchImpl: FetchImpl): NodeHttpShims;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
// The local-dev twin of the connector's `http`/`https` sandbox shim
|
|
2
|
+
// (octolog-extensions-sandbox `bundle/sandbox/nodeHttpShim.ts`). `serve` resolves
|
|
3
|
+
// `require("http")`/`require("https")` in a bundle to this adapter instead of Node's
|
|
4
|
+
// real modules, so an extension author gets the same behaviour locally as in the
|
|
5
|
+
// deployed sandbox: `request`/`get` over the allowlist-gated `fetch` (sandboxFetch.ts),
|
|
6
|
+
// never a raw socket. It re-implements only the request/response event surface an
|
|
7
|
+
// extension realistically touches — `.write`/`.end`, `res.on('data'|'end')`,
|
|
8
|
+
// `statusCode`/`headers`/`setEncoding` — not the full Node module.
|
|
9
|
+
//
|
|
10
|
+
// The `fetch` it routes through is passed in late-bound (`(i, init) => globalThis.fetch(...)`)
|
|
11
|
+
// so that, when a resolver runs, it picks up the delegating gated fetch installed by
|
|
12
|
+
// `installDelegatingFetch`/`wrapResolverMap` (sandboxFetch.ts) rather than the raw one.
|
|
13
|
+
//
|
|
14
|
+
// An `Agent` (constructed, or passed as the `agent` request option) is accepted but
|
|
15
|
+
// INERT: its settings — keep-alive/pooling, custom CA/mTLS, `rejectUnauthorized`,
|
|
16
|
+
// proxy — are silently dropped because every request goes through the gated `fetch`.
|
|
17
|
+
// We warn once so a request that depends on such a setting has a breadcrumb.
|
|
18
|
+
import { EventEmitter } from "node:events";
|
|
19
|
+
import { Readable } from "node:stream";
|
|
20
|
+
// One warning per process the first time an (inert) Agent is used.
|
|
21
|
+
let agentWarned = false;
|
|
22
|
+
function warnAgentIgnored() {
|
|
23
|
+
if (agentWarned)
|
|
24
|
+
return;
|
|
25
|
+
agentWarned = true;
|
|
26
|
+
console.warn("[extension] http/https `Agent` is not supported in the sandbox — its options " +
|
|
27
|
+
"(keep-alive/pooling, custom CA/mTLS, rejectUnauthorized, proxy) are ignored; " +
|
|
28
|
+
"every request goes through the allowlist-gated fetch");
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* An inert stand-in for Node's `http.Agent`. Every member is a no-op or empty
|
|
32
|
+
* default so SDK code that pokes at an agent runs without throwing — there is no
|
|
33
|
+
* real connection pool behind it (each request is an independent gated fetch).
|
|
34
|
+
* Constructing one via the public `Agent` warns; `globalAgent` is built directly.
|
|
35
|
+
*/
|
|
36
|
+
class AgentShim {
|
|
37
|
+
maxSockets = Infinity;
|
|
38
|
+
maxFreeSockets = 256;
|
|
39
|
+
sockets = {};
|
|
40
|
+
freeSockets = {};
|
|
41
|
+
requests = {};
|
|
42
|
+
options = {};
|
|
43
|
+
destroy() { }
|
|
44
|
+
getName() {
|
|
45
|
+
return "gated-fetch";
|
|
46
|
+
}
|
|
47
|
+
addRequest() { }
|
|
48
|
+
createConnection() { }
|
|
49
|
+
createSocket() { }
|
|
50
|
+
keepSocketAlive() {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
reuseSocket() { }
|
|
54
|
+
}
|
|
55
|
+
/** Coerce a Node header bag (values may be arrays) to fetch's string-valued form. */
|
|
56
|
+
function toStringHeaders(headers) {
|
|
57
|
+
const out = {};
|
|
58
|
+
if (!headers)
|
|
59
|
+
return out;
|
|
60
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
61
|
+
if (value == null)
|
|
62
|
+
continue;
|
|
63
|
+
out[key] = Array.isArray(value) ? value.map(String).join(", ") : String(value);
|
|
64
|
+
}
|
|
65
|
+
return out;
|
|
66
|
+
}
|
|
67
|
+
/** Resolve Node's overloaded `(url | options)[, options][, callback]` forms. */
|
|
68
|
+
function normalizeArgs(defaultProtocol, args) {
|
|
69
|
+
let index = 0;
|
|
70
|
+
let url;
|
|
71
|
+
let options = {};
|
|
72
|
+
const first = args[0];
|
|
73
|
+
if (typeof first === "string" || first instanceof URL) {
|
|
74
|
+
url = String(first);
|
|
75
|
+
index = 1;
|
|
76
|
+
if (typeof args[index] === "object" && args[index] !== null) {
|
|
77
|
+
options = args[index];
|
|
78
|
+
index += 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
else if (typeof first === "object" && first !== null) {
|
|
82
|
+
options = first;
|
|
83
|
+
index = 1;
|
|
84
|
+
}
|
|
85
|
+
const callback = typeof args[index] === "function" ? args[index] : undefined;
|
|
86
|
+
if (options.agent != null)
|
|
87
|
+
warnAgentIgnored();
|
|
88
|
+
let target;
|
|
89
|
+
if (url !== undefined) {
|
|
90
|
+
target = url;
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
const protocol = options.protocol ?? defaultProtocol;
|
|
94
|
+
const host = options.hostname ?? options.host ?? "localhost";
|
|
95
|
+
const port = options.port != null ? `:${options.port}` : "";
|
|
96
|
+
const path = options.path ?? "/";
|
|
97
|
+
target = `${protocol}//${host}${port}${path}`;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
url: target,
|
|
101
|
+
method: (options.method ?? "GET").toUpperCase(),
|
|
102
|
+
headers: toStringHeaders(options.headers),
|
|
103
|
+
callback,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/** Concatenate the written request-body chunks into a single fetch body. */
|
|
107
|
+
function buildBody(chunks) {
|
|
108
|
+
if (chunks.length === 0)
|
|
109
|
+
return undefined;
|
|
110
|
+
if (chunks.every((chunk) => typeof chunk === "string"))
|
|
111
|
+
return chunks.join("");
|
|
112
|
+
const encoder = new TextEncoder();
|
|
113
|
+
const parts = chunks.map((chunk) => (typeof chunk === "string" ? encoder.encode(chunk) : chunk));
|
|
114
|
+
const total = parts.reduce((sum, part) => sum + part.length, 0);
|
|
115
|
+
const merged = new Uint8Array(total);
|
|
116
|
+
let offset = 0;
|
|
117
|
+
for (const part of parts) {
|
|
118
|
+
merged.set(part, offset);
|
|
119
|
+
offset += part.length;
|
|
120
|
+
}
|
|
121
|
+
return merged;
|
|
122
|
+
}
|
|
123
|
+
/** Adapt a fetch `Response` into a Node `IncomingMessage`-like readable stream. */
|
|
124
|
+
function toIncomingMessage(response) {
|
|
125
|
+
// The DOM `ReadableStream` (fetch's `body`) and the `node:stream/web` one that
|
|
126
|
+
// `Readable.fromWeb` is typed against are structurally the same at runtime; cast
|
|
127
|
+
// across the two lib definitions.
|
|
128
|
+
const webStream = response.body;
|
|
129
|
+
const body = response.body ? Readable.fromWeb(webStream) : Readable.from([]);
|
|
130
|
+
const incoming = body;
|
|
131
|
+
incoming.statusCode = response.status;
|
|
132
|
+
incoming.statusMessage = response.statusText;
|
|
133
|
+
incoming.headers = Object.fromEntries(response.headers);
|
|
134
|
+
return incoming;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* A `ClientRequest`-like writable. Body chunks are buffered by `write`; `end`
|
|
138
|
+
* dispatches ONE gated `fetch` and, once it resolves, emits `'response'` with the
|
|
139
|
+
* adapted readable (and invokes the request callback). A gate refusal or transport
|
|
140
|
+
* failure surfaces as an `'error'` event.
|
|
141
|
+
*/
|
|
142
|
+
class ClientRequestShim extends EventEmitter {
|
|
143
|
+
target;
|
|
144
|
+
method;
|
|
145
|
+
fetchImpl;
|
|
146
|
+
chunks = [];
|
|
147
|
+
controller = new AbortController();
|
|
148
|
+
headers;
|
|
149
|
+
sent = false;
|
|
150
|
+
destroyed = false;
|
|
151
|
+
timeoutMs;
|
|
152
|
+
constructor(target, method, headers, fetchImpl, callback) {
|
|
153
|
+
super();
|
|
154
|
+
this.target = target;
|
|
155
|
+
this.method = method;
|
|
156
|
+
this.fetchImpl = fetchImpl;
|
|
157
|
+
this.headers = { ...headers };
|
|
158
|
+
if (callback)
|
|
159
|
+
this.once("response", callback);
|
|
160
|
+
}
|
|
161
|
+
setHeader(name, value) {
|
|
162
|
+
this.headers[name] = Array.isArray(value) ? value.map(String).join(", ") : String(value);
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
getHeader(name) {
|
|
166
|
+
return this.headers[name];
|
|
167
|
+
}
|
|
168
|
+
removeHeader(name) {
|
|
169
|
+
delete this.headers[name];
|
|
170
|
+
}
|
|
171
|
+
setTimeout(ms, callback) {
|
|
172
|
+
this.timeoutMs = ms;
|
|
173
|
+
if (callback)
|
|
174
|
+
this.once("timeout", callback);
|
|
175
|
+
return this;
|
|
176
|
+
}
|
|
177
|
+
write(chunk, encoding, callback) {
|
|
178
|
+
if (chunk != null)
|
|
179
|
+
this.chunks.push(chunk);
|
|
180
|
+
const done = typeof encoding === "function" ? encoding : callback;
|
|
181
|
+
done?.();
|
|
182
|
+
return true;
|
|
183
|
+
}
|
|
184
|
+
end(chunk, encoding, callback) {
|
|
185
|
+
let done = callback;
|
|
186
|
+
if (typeof chunk === "function") {
|
|
187
|
+
done = chunk;
|
|
188
|
+
chunk = undefined;
|
|
189
|
+
}
|
|
190
|
+
else if (typeof encoding === "function") {
|
|
191
|
+
done = encoding;
|
|
192
|
+
}
|
|
193
|
+
if (chunk != null)
|
|
194
|
+
this.chunks.push(chunk);
|
|
195
|
+
this.send();
|
|
196
|
+
done?.();
|
|
197
|
+
return this;
|
|
198
|
+
}
|
|
199
|
+
destroy(error) {
|
|
200
|
+
if (this.destroyed)
|
|
201
|
+
return this;
|
|
202
|
+
this.destroyed = true;
|
|
203
|
+
this.controller.abort();
|
|
204
|
+
if (error)
|
|
205
|
+
this.emit("error", error);
|
|
206
|
+
return this;
|
|
207
|
+
}
|
|
208
|
+
abort() {
|
|
209
|
+
this.destroy();
|
|
210
|
+
}
|
|
211
|
+
send() {
|
|
212
|
+
if (this.sent)
|
|
213
|
+
return;
|
|
214
|
+
this.sent = true;
|
|
215
|
+
const body = buildBody(this.chunks);
|
|
216
|
+
const init = { method: this.method, headers: this.headers, signal: this.controller.signal };
|
|
217
|
+
// A Uint8Array is a valid runtime `BodyInit`; cast past the narrower DOM type.
|
|
218
|
+
if (body != null && this.method !== "GET" && this.method !== "HEAD")
|
|
219
|
+
init.body = body;
|
|
220
|
+
let timer;
|
|
221
|
+
if (this.timeoutMs != null) {
|
|
222
|
+
timer = setTimeout(() => this.emit("timeout"), this.timeoutMs);
|
|
223
|
+
timer.unref?.();
|
|
224
|
+
}
|
|
225
|
+
Promise.resolve()
|
|
226
|
+
.then(() => this.fetchImpl(this.target, init))
|
|
227
|
+
.then((response) => {
|
|
228
|
+
if (timer)
|
|
229
|
+
clearTimeout(timer);
|
|
230
|
+
this.emit("response", toIncomingMessage(response));
|
|
231
|
+
})
|
|
232
|
+
.catch((error) => {
|
|
233
|
+
if (timer)
|
|
234
|
+
clearTimeout(timer);
|
|
235
|
+
if (!this.destroyed)
|
|
236
|
+
this.emit("error", error);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Build the `{ http, https }` module pair, each backed by the given gated `fetch`.
|
|
242
|
+
* `http` and `https` differ only in the default protocol applied when a request is
|
|
243
|
+
* described by an options object rather than a full URL.
|
|
244
|
+
*/
|
|
245
|
+
export function createNodeHttpShims(fetchImpl) {
|
|
246
|
+
const makeModule = (defaultProtocol) => {
|
|
247
|
+
const request = (...args) => {
|
|
248
|
+
const { url, method, headers, callback } = normalizeArgs(defaultProtocol, args);
|
|
249
|
+
return new ClientRequestShim(url, method, headers, fetchImpl, callback);
|
|
250
|
+
};
|
|
251
|
+
const get = (...args) => {
|
|
252
|
+
const req = request(...args);
|
|
253
|
+
req.end();
|
|
254
|
+
return req;
|
|
255
|
+
};
|
|
256
|
+
const Agent = class extends AgentShim {
|
|
257
|
+
constructor(_options) {
|
|
258
|
+
super();
|
|
259
|
+
warnAgentIgnored();
|
|
260
|
+
}
|
|
261
|
+
};
|
|
262
|
+
return { request, get, Agent, globalAgent: new AgentShim() };
|
|
263
|
+
};
|
|
264
|
+
return { http: makeModule("http:"), https: makeModule("https:") };
|
|
265
|
+
}
|
|
266
|
+
//# sourceMappingURL=nodeHttpShim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeHttpShim.js","sourceRoot":"","sources":["../../../src/lib/tooling/nodeHttpShim.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,kFAAkF;AAClF,qFAAqF;AACrF,iFAAiF;AACjF,wFAAwF;AACxF,kFAAkF;AAClF,6EAA6E;AAC7E,mEAAmE;AACnE,EAAE;AACF,+FAA+F;AAC/F,qFAAqF;AACrF,wFAAwF;AACxF,EAAE;AACF,oFAAoF;AACpF,kFAAkF;AAClF,qFAAqF;AACrF,6EAA6E;AAE7E,OAAO,EAAE,YAAY,E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pD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;YAC7B,GAAG,CAAC,GAAG,EAAE,CAAC;YACV,OAAO,GAAG,CAAC;QACb,CAAC,CAAC;QACF,MAAM,KAAK,GAAG,KAAM,SAAQ,SAAS;YACnC,YAAY,QAAkB;gBAC5B,KAAK,EAAE,CAAC;gBACR,gBAAgB,EAAE,CAAC;YACrB,CAAC;SACF,CAAC;QACF,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,SAAS,EAAE,EAAE,CAAC;IAC/D,CAAC,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;AACpE,CAAC"}
|
|
@@ -11,10 +11,18 @@
|
|
|
11
11
|
// - a well-known global the sandbox does NOT endow (`process`, `Buffer`,
|
|
12
12
|
// `setInterval`, `SharedArrayBuffer`, `WebAssembly`, DOM globals, …) — so an
|
|
13
13
|
// author who reaches for one is warned here instead of crashing at runtime;
|
|
14
|
-
// - importing a Node built-in (`fs`, `crypto`, `node:*`, …) — use `fetch` or an npm
|
|
14
|
+
// - importing a Node built-in (`fs`, `crypto`, `node:*`, …) — use `fetch` or an npm
|
|
15
|
+
// package. The sole exception is `http`/`https`: the runtime resolves those to a
|
|
16
|
+
// gated shim (the same allowlist-gated `fetch`, no raw socket), so they are allowed;
|
|
15
17
|
// - `eval` / `new Function`.
|
|
16
18
|
import { readFile } from "node:fs/promises";
|
|
17
19
|
import ts from "typescript";
|
|
20
|
+
/**
|
|
21
|
+
* Node built-in module ids the runtime DOES provide — as a gated `fetch` shim, not
|
|
22
|
+
* the real module (nodeHttpShim.ts). Allowed through the import check below; the
|
|
23
|
+
* `node:`-prefixed aliases are listed so either spelling passes.
|
|
24
|
+
*/
|
|
25
|
+
const HOST_PROVIDED_MODULES = new Set(["http", "https", "node:http", "node:https"]);
|
|
18
26
|
/** Node core modules an extension may not import; `node:`-prefixed ids are also rejected. */
|
|
19
27
|
const NODE_BUILTINS = new Set([
|
|
20
28
|
"assert", "async_hooks", "buffer", "child_process", "cluster", "console",
|
|
@@ -75,8 +83,11 @@ const UNAVAILABLE_GLOBALS = new Map([
|
|
|
75
83
|
["XMLHttpRequest", "not available; use the global `fetch`"],
|
|
76
84
|
["WebSocket", "not available; only outbound `fetch` egress is provided"],
|
|
77
85
|
]);
|
|
78
|
-
/** Is `spec` a Node built-in module (or a `node:`-prefixed import)
|
|
86
|
+
/** Is `spec` a Node built-in module (or a `node:`-prefixed import) the runtime does
|
|
87
|
+
* NOT provide? `http`/`https` are excluded — the runtime maps them to a gated shim. */
|
|
79
88
|
function isBuiltinSpecifier(spec) {
|
|
89
|
+
if (HOST_PROVIDED_MODULES.has(spec))
|
|
90
|
+
return false;
|
|
80
91
|
if (spec.startsWith("node:"))
|
|
81
92
|
return true;
|
|
82
93
|
return NODE_BUILTINS.has(spec);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staticAnalysis.js","sourceRoot":"","sources":["../../../src/lib/tooling/staticAnalysis.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,gFAAgF;AAChF,6EAA6E;AAC7E,yDAAyD;AACzD,qFAAqF;AACrF,sFAAsF;AACtF,2BAA2B;AAC3B,2EAA2E;AAC3E,iFAAiF;AACjF,gFAAgF;AAChF
|
|
1
|
+
{"version":3,"file":"staticAnalysis.js","sourceRoot":"","sources":["../../../src/lib/tooling/staticAnalysis.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,mFAAmF;AACnF,kFAAkF;AAClF,gFAAgF;AAChF,6EAA6E;AAC7E,yDAAyD;AACzD,qFAAqF;AACrF,sFAAsF;AACtF,2BAA2B;AAC3B,2EAA2E;AAC3E,iFAAiF;AACjF,gFAAgF;AAChF,sFAAsF;AACtF,q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AAgB,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC9F,iBAAiB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/cli-topic-integration-layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "commercetools CLI plugin: integration-layer topic",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@oclif/test": "^4.1.12",
|
|
38
38
|
"@types/node": "^22.10.2",
|
|
39
39
|
"rimraf": "^6.0.1",
|
|
40
|
-
"vitest": "^4.1.
|
|
40
|
+
"vitest": "^4.1.11"
|
|
41
41
|
},
|
|
42
42
|
"oclif": {
|
|
43
43
|
"topicSeparator": " ",
|