@archildata/client 0.8.2 → 0.8.4
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.
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/api/index.d.mts
CHANGED
|
@@ -168,8 +168,8 @@ interface components {
|
|
|
168
168
|
* @example my-data-disk
|
|
169
169
|
*/
|
|
170
170
|
name: string;
|
|
171
|
-
/** @description Storage mount to attach
|
|
172
|
-
mounts
|
|
171
|
+
/** @description Storage mount to attach. Omit for archil-managed storage. */
|
|
172
|
+
mounts?: components["schemas"]["MountConfig"][];
|
|
173
173
|
/** @description Authentication methods for disk access */
|
|
174
174
|
authMethods?: components["schemas"]["DiskUser"][];
|
|
175
175
|
};
|
package/dist/api/index.d.ts
CHANGED
|
@@ -168,8 +168,8 @@ interface components {
|
|
|
168
168
|
* @example my-data-disk
|
|
169
169
|
*/
|
|
170
170
|
name: string;
|
|
171
|
-
/** @description Storage mount to attach
|
|
172
|
-
mounts
|
|
171
|
+
/** @description Storage mount to attach. Omit for archil-managed storage. */
|
|
172
|
+
mounts?: components["schemas"]["MountConfig"][];
|
|
173
173
|
/** @description Authentication methods for disk access */
|
|
174
174
|
authMethods?: components["schemas"]["DiskUser"][];
|
|
175
175
|
};
|
package/native.js
CHANGED
|
@@ -17,18 +17,9 @@ if (typeof __dirname === 'undefined' || !existsSync(__dirname)) {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const SUPPORTED_PLATFORMS = {
|
|
20
|
-
'linux-x64-gnu':
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
'linux-arm64-gnu': {
|
|
25
|
-
localFile: 'archildata-client.linux-arm64-gnu.node',
|
|
26
|
-
package: '@archildata/client-linux-arm64-gnu',
|
|
27
|
-
},
|
|
28
|
-
'darwin-arm64': {
|
|
29
|
-
localFile: 'archildata-client.darwin-arm64.node',
|
|
30
|
-
package: '@archildata/client-darwin-arm64',
|
|
31
|
-
},
|
|
20
|
+
'linux-x64-gnu': 'archildata-client.linux-x64-gnu.node',
|
|
21
|
+
'linux-arm64-gnu': 'archildata-client.linux-arm64-gnu.node',
|
|
22
|
+
'darwin-arm64': 'archildata-client.darwin-arm64.node',
|
|
32
23
|
}
|
|
33
24
|
|
|
34
25
|
function isMusl() {
|
|
@@ -62,36 +53,25 @@ if (platform === 'darwin') {
|
|
|
62
53
|
)
|
|
63
54
|
}
|
|
64
55
|
|
|
65
|
-
const
|
|
56
|
+
const binaryName = SUPPORTED_PLATFORMS[platformKey]
|
|
66
57
|
|
|
67
|
-
if (!
|
|
58
|
+
if (!binaryName) {
|
|
68
59
|
throw new Error(
|
|
69
60
|
`@archildata/client does not support ${platform}/${arch}. ` +
|
|
70
61
|
`Supported platforms: Linux x64, Linux arm64, macOS arm64.`
|
|
71
62
|
)
|
|
72
63
|
}
|
|
73
64
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
} else {
|
|
81
|
-
try {
|
|
82
|
-
nativeBinding = require(target.package)
|
|
83
|
-
} catch (e) {
|
|
84
|
-
throw new Error(
|
|
85
|
-
`Failed to load native binding for ${platformKey}. ` +
|
|
86
|
-
`Tried platform package '${target.package}' but it was not installed.\n\n` +
|
|
87
|
-
`If you're using npm, reinstall with: npm install @archildata/client\n` +
|
|
88
|
-
`If you're using a bundler (tsup, webpack, esbuild), mark @archildata/client ` +
|
|
89
|
-
`as external — native .node addons cannot be bundled.\n\n` +
|
|
90
|
-
`Original error: ${e.message}`
|
|
91
|
-
)
|
|
92
|
-
}
|
|
65
|
+
const localPath = join(__dirname, binaryName)
|
|
66
|
+
if (!existsSync(localPath)) {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`Native binding not found at ${localPath}. ` +
|
|
69
|
+
`Try reinstalling: npm install @archildata/client`
|
|
70
|
+
)
|
|
93
71
|
}
|
|
94
72
|
|
|
73
|
+
const nativeBinding = require(localPath)
|
|
74
|
+
|
|
95
75
|
const { initLogging, ArchilClient, JsInodeType } = nativeBinding
|
|
96
76
|
|
|
97
77
|
module.exports.initLogging = initLogging
|