@odla-ai/cli 0.38.0 → 0.38.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.
- package/dist/bin.cjs +10 -2
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-DKOJBWRJ.js → chunk-HETCZVFB.js} +11 -3
- package/dist/chunk-HETCZVFB.js.map +1 -0
- package/dist/{cli-DZKEPGBZ.js → cli-LGYDXY5R.js} +2 -2
- package/dist/index.cjs +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-DKOJBWRJ.js.map +0 -1
- /package/dist/{cli-DZKEPGBZ.js.map → cli-LGYDXY5R.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runCli
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HETCZVFB.js";
|
|
5
5
|
import {
|
|
6
6
|
exitCodeFor
|
|
7
7
|
} from "./chunk-UKLSRQ5J.js";
|
|
@@ -9,4 +9,4 @@ export {
|
|
|
9
9
|
exitCodeFor,
|
|
10
10
|
runCli
|
|
11
11
|
};
|
|
12
|
-
//# sourceMappingURL=cli-
|
|
12
|
+
//# sourceMappingURL=cli-LGYDXY5R.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1858,7 +1858,11 @@ async function resolveOperatorContext(parsed, options = {}) {
|
|
|
1858
1858
|
const appEnvironment = clean2(import_node_process10.default.env.ODLA_APP_ID);
|
|
1859
1859
|
const appValue = appFlag ?? appEnvironment ?? profile.value?.app ?? loaded?.app.id ?? null;
|
|
1860
1860
|
const appSource = appFlag ? "flag" : appEnvironment ? "environment" : profile.value?.app ? "profile" : loaded ? "config" : "unresolved";
|
|
1861
|
-
if (appValue)
|
|
1861
|
+
if (appValue) {
|
|
1862
|
+
for (const id2 of options.allowAppList ? appValue.split(",") : [appValue]) {
|
|
1863
|
+
assertOperatorName(id2.trim(), "app");
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1862
1866
|
if (options.requireApp && !appValue) {
|
|
1863
1867
|
throw new Error(
|
|
1864
1868
|
"app context is unresolved; pass --app <id>, set ODLA_APP_ID, select --context <name>, or run inside a project with odla.config.mjs"
|
|
@@ -13737,7 +13741,11 @@ async function revoke(parsed, deps, cfg, doFetch, out, json) {
|
|
|
13737
13741
|
if (json) out.log(JSON.stringify({ deviceId, revoked: true }, null, 2));
|
|
13738
13742
|
}
|
|
13739
13743
|
async function scopedToken2(parsed, deps, cfg, doFetch, out, label, scope = "app:device:enroll") {
|
|
13740
|
-
const { credentials } = await resolveOperatorContext(parsed, {
|
|
13744
|
+
const { credentials } = await resolveOperatorContext(parsed, {
|
|
13745
|
+
allowMissingConfig: true,
|
|
13746
|
+
// A device is granted the apps named in ONE approval, so --app is a list here.
|
|
13747
|
+
allowAppList: true
|
|
13748
|
+
});
|
|
13741
13749
|
const scopedTokenFile = credentials.scopedTokenFile;
|
|
13742
13750
|
return getScopedPlatformToken({
|
|
13743
13751
|
platform: cfg.platformUrl,
|