fluncle 0.266.0 → 0.267.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/bin/fluncle.mjs +22 -2
- package/package.json +1 -1
package/bin/fluncle.mjs
CHANGED
|
@@ -386,12 +386,16 @@ __export(exports_env, {
|
|
|
386
386
|
loadEnv: () => loadEnv,
|
|
387
387
|
readOptionalEnv: () => readOptionalEnv
|
|
388
388
|
});
|
|
389
|
+
import { execFileSync } from "node:child_process";
|
|
389
390
|
import { homedir } from "node:os";
|
|
390
391
|
import { join } from "node:path";
|
|
391
392
|
function loadEnv(keys) {
|
|
392
393
|
loadConfig();
|
|
393
394
|
const result = {};
|
|
394
395
|
const missing = [];
|
|
396
|
+
if (keys.includes("FLUNCLE_API_TOKEN")) {
|
|
397
|
+
resolveTokenRef();
|
|
398
|
+
}
|
|
395
399
|
for (const key of keys) {
|
|
396
400
|
const value = process.env[key];
|
|
397
401
|
if (value === undefined) {
|
|
@@ -413,6 +417,21 @@ function getApiBaseUrl() {
|
|
|
413
417
|
loadConfig();
|
|
414
418
|
return (process.env.FLUNCLE_API_BASE_URL ?? "https://www.fluncle.com").replace(/\/+$/, "");
|
|
415
419
|
}
|
|
420
|
+
function resolveTokenRef() {
|
|
421
|
+
const ref = process.env.FLUNCLE_API_TOKEN_REF;
|
|
422
|
+
if (process.env.FLUNCLE_API_TOKEN !== undefined || !ref || false) {
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
try {
|
|
426
|
+
const secretRef = ref.startsWith("op://") ? ref : `op://${ref}`;
|
|
427
|
+
process.env.FLUNCLE_API_TOKEN = execFileSync("op", ["read", "--no-newline", secretRef], {
|
|
428
|
+
encoding: "utf8",
|
|
429
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
430
|
+
});
|
|
431
|
+
} catch {
|
|
432
|
+
throw new Error(`Could not read FLUNCLE_API_TOKEN_REF (${ref}) with op.`);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
416
435
|
function loadConfig() {
|
|
417
436
|
const profile = getEnvProfile();
|
|
418
437
|
if (loadedProfile === profile) {
|
|
@@ -632,7 +651,7 @@ function parseVersion(version) {
|
|
|
632
651
|
var currentVersion;
|
|
633
652
|
var init_version = __esm(() => {
|
|
634
653
|
init_output();
|
|
635
|
-
currentVersion = "0.
|
|
654
|
+
currentVersion = "0.267.0".trim() ? "0.267.0".trim() : "0.1.0";
|
|
636
655
|
});
|
|
637
656
|
|
|
638
657
|
// src/update-notifier.ts
|
|
@@ -2345,7 +2364,7 @@ function parseVersion2(version) {
|
|
|
2345
2364
|
var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
|
|
2346
2365
|
var init_version2 = __esm(() => {
|
|
2347
2366
|
init_output();
|
|
2348
|
-
currentVersion2 = "0.
|
|
2367
|
+
currentVersion2 = "0.267.0".trim() ? "0.267.0".trim() : "0.1.0";
|
|
2349
2368
|
});
|
|
2350
2369
|
|
|
2351
2370
|
// ../../packages/registry/src/index.ts
|
|
@@ -11417,6 +11436,7 @@ var init_admin_artifacts = __esm(() => {
|
|
|
11417
11436
|
tags: ["Admin"]
|
|
11418
11437
|
}).input(strictObject({
|
|
11419
11438
|
consumerId: ConsumerIdSchema,
|
|
11439
|
+
fromSeq: number3().int().nonnegative().optional(),
|
|
11420
11440
|
limit: number3().int().min(1).max(ARTIFACT_CHANGE_API_MAX_LIMIT).default(100)
|
|
11421
11441
|
})).output(ArtifactChangePageSchema);
|
|
11422
11442
|
acknowledgeArtifactChanges = oc.route({
|
package/package.json
CHANGED