@withgateway/sdk 0.1.17 → 0.1.18
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/cli.js +6 -3
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +6 -3
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -4
- package/dist/index.mjs.map +1 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.js.map +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/dist/tracing/index.mjs.map +1 -1
- package/dist/worlds/index.js +6 -3
- package/dist/worlds/index.js.map +1 -1
- package/dist/worlds/index.mjs +6 -3
- package/dist/worlds/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -339,7 +339,7 @@ function isIncludedInContentHash(relPath, includeAllRootFiles) {
|
|
|
339
339
|
if (name.startsWith(".")) return false;
|
|
340
340
|
if (parts.includes("__pycache__")) return false;
|
|
341
341
|
if (dirParts.length === 0) {
|
|
342
|
-
return includeAllRootFiles || name === "README.md" || name === "pyproject.toml" || name
|
|
342
|
+
return includeAllRootFiles || name === "README.md" || name === "pyproject.toml" || BROAD_ROOT_MARKERS.includes(name) || name.endsWith(".py");
|
|
343
343
|
}
|
|
344
344
|
return !dirParts.some(isExcludedDirComponent);
|
|
345
345
|
}
|
|
@@ -350,7 +350,9 @@ function collectArchiveRelPaths(dir) {
|
|
|
350
350
|
);
|
|
351
351
|
}
|
|
352
352
|
const out = [];
|
|
353
|
-
const includeAllRootFiles =
|
|
353
|
+
const includeAllRootFiles = BROAD_ROOT_MARKERS.some(
|
|
354
|
+
(marker) => fs.existsSync(path.join(dir, marker))
|
|
355
|
+
);
|
|
354
356
|
const walk = (rel) => {
|
|
355
357
|
const abs = rel ? path.join(dir, rel) : dir;
|
|
356
358
|
for (const entry of fs.readdirSync(abs, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
@@ -664,7 +666,7 @@ async function createRef(slug, name, kind, versionId, options = {}) {
|
|
|
664
666
|
...versionId ? { versionId } : {}
|
|
665
667
|
});
|
|
666
668
|
}
|
|
667
|
-
var import_node_crypto, import_node_zlib, fs, path, DEFAULT_BRANCH, META_RELPATH, SKIP_DIRS, ROOT_EXCLUDED_DIRS, sha256b64;
|
|
669
|
+
var import_node_crypto, import_node_zlib, fs, path, DEFAULT_BRANCH, META_RELPATH, SKIP_DIRS, ROOT_EXCLUDED_DIRS, BROAD_ROOT_MARKERS, sha256b64;
|
|
668
670
|
var init_hub = __esm({
|
|
669
671
|
"src/worlds/hub.ts"() {
|
|
670
672
|
"use strict";
|
|
@@ -686,6 +688,7 @@ var init_hub = __esm({
|
|
|
686
688
|
"outputs"
|
|
687
689
|
]);
|
|
688
690
|
ROOT_EXCLUDED_DIRS = /* @__PURE__ */ new Set(["dist", "build", "outputs", "__pycache__"]);
|
|
691
|
+
BROAD_ROOT_MARKERS = ["gateway-env.toml", "gateway-api-world.toml"];
|
|
689
692
|
sha256b64 = (data) => (0, import_node_crypto.createHash)("sha256").update(data).digest("base64");
|
|
690
693
|
}
|
|
691
694
|
});
|
|
@@ -1108,7 +1111,7 @@ var require_package = __commonJS({
|
|
|
1108
1111
|
"package.json"(exports2, module2) {
|
|
1109
1112
|
module2.exports = {
|
|
1110
1113
|
name: "@withgateway/sdk",
|
|
1111
|
-
version: "0.1.
|
|
1114
|
+
version: "0.1.18",
|
|
1112
1115
|
description: "Gateway SDK for TypeScript - A/B experiments, tracing, and observability",
|
|
1113
1116
|
main: "./dist/index.js",
|
|
1114
1117
|
module: "./dist/index.mjs",
|