buckyos 0.7.154 → 0.7.155

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.
Files changed (58) hide show
  1. package/cli/core/app.ts +2 -0
  2. package/cli/core/task.ts +2 -1
  3. package/cli/dist/cli.mjs +235 -94
  4. package/cli/dist/cli.mjs.map +1 -1
  5. package/cli/modules/obj.ts +163 -0
  6. package/cli/version.ts +1 -1
  7. package/dist/aiworkspace_client.d.ts +9 -0
  8. package/dist/aiworkspace_client.d.ts.map +1 -1
  9. package/dist/browser.cjs +1 -1
  10. package/dist/browser.cjs.map +1 -1
  11. package/dist/browser.d.ts +1 -0
  12. package/dist/browser.d.ts.map +1 -1
  13. package/dist/browser.mjs +183 -182
  14. package/dist/browser.mjs.map +1 -1
  15. package/dist/executor_client-022a19b9.js +13 -0
  16. package/dist/executor_client-022a19b9.js.map +1 -0
  17. package/dist/{executor_client-dde508e1.mjs → executor_client-78ad0749.mjs} +597 -188
  18. package/dist/executor_client-78ad0749.mjs.map +1 -0
  19. package/dist/hybrid_sso.d.ts +2 -1
  20. package/dist/hybrid_sso.d.ts.map +1 -1
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.ts +1 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.mjs +188 -185
  26. package/dist/index.mjs.map +1 -1
  27. package/dist/msg_center_client.d.ts +4 -3
  28. package/dist/msg_center_client.d.ts.map +1 -1
  29. package/dist/{ndn_types-bbb1f6a6.mjs → namelib-b41b10cc.mjs} +2683 -2683
  30. package/dist/namelib-b41b10cc.mjs.map +1 -0
  31. package/dist/namelib-f8ff0045.js +2 -0
  32. package/dist/namelib-f8ff0045.js.map +1 -0
  33. package/dist/node.cjs +1 -1
  34. package/dist/node.cjs.map +1 -1
  35. package/dist/node.d.ts +1 -0
  36. package/dist/node.d.ts.map +1 -1
  37. package/dist/node.mjs +183 -182
  38. package/dist/node.mjs.map +1 -1
  39. package/dist/object_url.d.ts +65 -0
  40. package/dist/object_url.d.ts.map +1 -0
  41. package/dist/provision.cjs +1 -1
  42. package/dist/provision.cjs.map +1 -1
  43. package/dist/provision.mjs +1 -1
  44. package/dist/sdk_core.d.ts +1 -1
  45. package/dist/sdk_core.d.ts.map +1 -1
  46. package/dist/task_mgr_client.d.ts +2 -0
  47. package/dist/task_mgr_client.d.ts.map +1 -1
  48. package/dist/{tus_client-d313689e.mjs → tus_client-04080b1e.mjs} +2 -2
  49. package/dist/{tus_client-d313689e.mjs.map → tus_client-04080b1e.mjs.map} +1 -1
  50. package/dist/{tus_client-65c5fc5e.js → tus_client-4f7254e9.js} +2 -2
  51. package/dist/{tus_client-65c5fc5e.js.map → tus_client-4f7254e9.js.map} +1 -1
  52. package/package.json +1 -1
  53. package/dist/executor_client-cafb8a35.js +0 -13
  54. package/dist/executor_client-cafb8a35.js.map +0 -1
  55. package/dist/executor_client-dde508e1.mjs.map +0 -1
  56. package/dist/ndn_types-08dc9ef1.js +0 -2
  57. package/dist/ndn_types-08dc9ef1.js.map +0 -1
  58. package/dist/ndn_types-bbb1f6a6.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object_url.d.ts","sourceRoot":"","sources":["../src/object_url.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAEnC,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,+HAYpB,CAAA;AAEV,eAAO,MAAM,mBAAmB,SAAS,CAAA;AAEzC,qBAAa,cAAe,SAAQ,KAAK;CAAG;AAE5C,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAElE,MAAM,MAAM,SAAS,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;C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AE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAUpE;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,SAAS,GAAG,MAAM,CAGzD;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAKrD;AAED,+FAA+F;AAC/F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAExE;AAMD,0GAA0G;AAC1G,wBAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS5F;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAEzE;AAED,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAE3E;AAED,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CASpD;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,kDAAkD;AAClD,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEjE"}
@@ -1,4 +1,4 @@
1
- "use strict";var e,t=Object.defineProperty,r=(e,r,i)=>(((e,r,i)=>{r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i})(e,"symbol"!=typeof r?r+"":r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./ndn_types-08dc9ef1.js"),n=require("node:buffer"),o=require("node:crypto"),s="device_doc.jwt",a="device_mini_doc.jwt",c="node_gateway_params.json";function u(e){const t=globalThis.process;if("function"==typeof(null==t?void 0:t.getBuiltinModule)){const r=t.getBuiltinModule(e);if(r)return r}if("function"==typeof require)return require(e);throw new Error(`buckyos device_identity cannot load builtin module ${e} in this runtime`)}function l(e){return e instanceof i.DID?e:i.DID.fromStr(e)}function p(e,t){const r=u("node:fs"),i=u("node:path");r.mkdirSync(i.dirname(e),{recursive:!0}),r.writeFileSync(e,JSON.stringify(t,null,2))}function h(e){return{schema:i.NODE_IDENTITY_SCHEMA_V2,zone_did:l(e.zoneDid).toString(),owner_did:l(e.ownerDid).toString(),owner_public_key:e.ownerPublicKey,device_name:e.deviceName,device_did:l(e.deviceDid).toString(),zone_iat:e.zoneIat}}function d(e){const t=u("node:fs"),r=JSON.parse(t.readFileSync(e,"utf8"));if(r.schema!==i.NODE_IDENTITY_SCHEMA_V2)throw new Error(`unsupported node_identity schema '${r.schema}', expected '${i.NODE_IDENTITY_SCHEMA_V2}'`);return r}function f(e,t){const r=u("node:path"),i=l(t).toString(),n=e.publicDir(i);return{publicDir:n,securityDir:e.securityDir(i),didJson:e.publicFile(i,"authentication","did-json"),deviceDocJwt:r.join(n,s),deviceMiniDocJwt:r.join(n,a),authenticationPrivateKey:e.securityFile(i,"authentication","private")}}function y(e,t){const r=e.trim();if(!r)throw new Error("device name is empty");const n=l(t),o="web"===n.method?n.toRawHostName():n.id.split(":")[0]??n.id;if(!o.trim())throw new Error(`zone DID ${n.toString()} has empty host/name`);return new i.DID(n.method,`${r}.${o}`)}function g(e,t){const r=l(t).toString();if(e.id=r,!Array.isArray(e.verificationMethod))throw new Error("device document verificationMethod is missing");for(const i of e.verificationMethod)i.controller=r;return e}function m(e,t,r,n){return g(i.newDeviceDocumentByJwk(e,t,n),r)}function v(e,t){return u("node:fs").readFileSync(f(e,t).deviceDocJwt,"utf8")}function w(e,t,r=2980){if(!Number.isInteger(r)||r<1||r>65535)throw new Error(`invalid device RTCP port: ${r}`);p(u("node:path").join(e,c),{params:{device_did:l(t).toString(),rtcp_port:String(r)}})}function b(e,t,r,n,o,s,a){const c=u("node:fs"),l=u("node:path"),h=f(t,r.device_did);return c.mkdirSync(h.publicDir,{recursive:!0}),c.mkdirSync(h.securityDir,{recursive:!0}),p(l.join(e,"node_identity.json"),r),w(e,r.device_did,n.rtcp_port),p(h.didJson,i.deviceDocumentToOrderedJson(n)),c.writeFileSync(h.deviceDocJwt,o),c.writeFileSync(h.deviceMiniDocJwt,s),c.writeFileSync(h.authenticationPrivateKey,a),h}function S(e){return i.decodeJwtClaimWithoutVerify(e)}
1
+ "use strict";var e,t=Object.defineProperty,r=(e,r,i)=>(((e,r,i)=>{r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i})(e,"symbol"!=typeof r?r+"":r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./namelib-f8ff0045.js"),n=require("node:buffer"),o=require("node:crypto"),s="device_doc.jwt",a="device_mini_doc.jwt",c="node_gateway_params.json";function u(e){const t=globalThis.process;if("function"==typeof(null==t?void 0:t.getBuiltinModule)){const r=t.getBuiltinModule(e);if(r)return r}if("function"==typeof require)return require(e);throw new Error(`buckyos device_identity cannot load builtin module ${e} in this runtime`)}function l(e){return e instanceof i.DID?e:i.DID.fromStr(e)}function p(e,t){const r=u("node:fs"),i=u("node:path");r.mkdirSync(i.dirname(e),{recursive:!0}),r.writeFileSync(e,JSON.stringify(t,null,2))}function h(e){return{schema:i.NODE_IDENTITY_SCHEMA_V2,zone_did:l(e.zoneDid).toString(),owner_did:l(e.ownerDid).toString(),owner_public_key:e.ownerPublicKey,device_name:e.deviceName,device_did:l(e.deviceDid).toString(),zone_iat:e.zoneIat}}function d(e){const t=u("node:fs"),r=JSON.parse(t.readFileSync(e,"utf8"));if(r.schema!==i.NODE_IDENTITY_SCHEMA_V2)throw new Error(`unsupported node_identity schema '${r.schema}', expected '${i.NODE_IDENTITY_SCHEMA_V2}'`);return r}function f(e,t){const r=u("node:path"),i=l(t).toString(),n=e.publicDir(i);return{publicDir:n,securityDir:e.securityDir(i),didJson:e.publicFile(i,"authentication","did-json"),deviceDocJwt:r.join(n,s),deviceMiniDocJwt:r.join(n,a),authenticationPrivateKey:e.securityFile(i,"authentication","private")}}function y(e,t){const r=e.trim();if(!r)throw new Error("device name is empty");const n=l(t),o="web"===n.method?n.toRawHostName():n.id.split(":")[0]??n.id;if(!o.trim())throw new Error(`zone DID ${n.toString()} has empty host/name`);return new i.DID(n.method,`${r}.${o}`)}function g(e,t){const r=l(t).toString();if(e.id=r,!Array.isArray(e.verificationMethod))throw new Error("device document verificationMethod is missing");for(const i of e.verificationMethod)i.controller=r;return e}function m(e,t,r,n){return g(i.newDeviceDocumentByJwk(e,t,n),r)}function v(e,t){return u("node:fs").readFileSync(f(e,t).deviceDocJwt,"utf8")}function w(e,t,r=2980){if(!Number.isInteger(r)||r<1||r>65535)throw new Error(`invalid device RTCP port: ${r}`);p(u("node:path").join(e,c),{params:{device_did:l(t).toString(),rtcp_port:String(r)}})}function b(e,t,r,n,o,s,a){const c=u("node:fs"),l=u("node:path"),h=f(t,r.device_did);return c.mkdirSync(h.publicDir,{recursive:!0}),c.mkdirSync(h.securityDir,{recursive:!0}),p(l.join(e,"node_identity.json"),r),w(e,r.device_did,n.rtcp_port),p(h.didJson,i.deviceDocumentToOrderedJson(n)),c.writeFileSync(h.deviceDocJwt,o),c.writeFileSync(h.deviceMiniDocJwt,s),c.writeFileSync(h.authenticationPrivateKey,a),h}function S(e){return i.decodeJwtClaimWithoutVerify(e)}
2
2
  /*! *****************************************************************************
3
3
  Copyright (C) Microsoft. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use