@twin.org/node-core 0.0.2-next.25 → 0.0.2-next.26
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/README.md +21 -7
- package/dist/cjs/index.cjs +387 -49
- package/dist/esm/index.mjs +382 -53
- package/dist/types/index.d.ts +4 -0
- package/dist/types/models/ICacheMetadata.d.ts +17 -0
- package/dist/types/models/IModuleProtocol.d.ts +18 -0
- package/dist/types/models/INodeEnvironmentVariables.d.ts +25 -0
- package/dist/types/models/IProtocolHandlerResult.d.ts +13 -0
- package/dist/types/models/moduleProtocol.d.ts +29 -0
- package/dist/types/node.d.ts +3 -2
- package/dist/types/utils.d.ts +67 -0
- package/docs/changelog.md +7 -0
- package/docs/detailed-guide.md +129 -0
- package/docs/reference/functions/createModuleImportUrl.md +21 -0
- package/docs/reference/functions/getExtensionsCacheDir.md +31 -0
- package/docs/reference/functions/handleHttpsProtocol.md +49 -0
- package/docs/reference/functions/handleNpmProtocol.md +31 -0
- package/docs/reference/functions/hashUrl.md +19 -0
- package/docs/reference/functions/isCacheExpired.md +31 -0
- package/docs/reference/functions/overrideModuleImport.md +8 -2
- package/docs/reference/functions/parseModuleProtocol.md +19 -0
- package/docs/reference/functions/resolvePackageEntryPoint.md +32 -0
- package/docs/reference/index.md +13 -0
- package/docs/reference/interfaces/ICacheMetadata.md +27 -0
- package/docs/reference/interfaces/IModuleProtocol.md +27 -0
- package/docs/reference/interfaces/INodeEnvironmentVariables.md +70 -0
- package/docs/reference/interfaces/IProtocolHandlerResult.md +19 -0
- package/docs/reference/type-aliases/ModuleProtocol.md +5 -0
- package/docs/reference/variables/ModuleProtocol.md +37 -0
- package/locales/en.json +11 -2
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Variable: ModuleProtocol
|
|
2
|
+
|
|
3
|
+
> `const` **ModuleProtocol**: `object`
|
|
4
|
+
|
|
5
|
+
The protocol types for modules.
|
|
6
|
+
|
|
7
|
+
## Type Declaration
|
|
8
|
+
|
|
9
|
+
### Local
|
|
10
|
+
|
|
11
|
+
> `readonly` **Local**: `"local"` = `"local"`
|
|
12
|
+
|
|
13
|
+
Local module (starts with . or / or file://).
|
|
14
|
+
|
|
15
|
+
### Npm
|
|
16
|
+
|
|
17
|
+
> `readonly` **Npm**: `"npm"` = `"npm"`
|
|
18
|
+
|
|
19
|
+
NPM package (starts with npm:).
|
|
20
|
+
|
|
21
|
+
### Https
|
|
22
|
+
|
|
23
|
+
> `readonly` **Https**: `"https"` = `"https"`
|
|
24
|
+
|
|
25
|
+
HTTPS URL (starts with https://).
|
|
26
|
+
|
|
27
|
+
### Http
|
|
28
|
+
|
|
29
|
+
> `readonly` **Http**: `"http"` = `"http"`
|
|
30
|
+
|
|
31
|
+
HTTP URL (starts with http://).
|
|
32
|
+
|
|
33
|
+
### Default
|
|
34
|
+
|
|
35
|
+
> `readonly` **Default**: `"default"` = `"default"`
|
|
36
|
+
|
|
37
|
+
Default/standard module resolution.
|
package/locales/en.json
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
"error": {
|
|
3
3
|
"node": {
|
|
4
4
|
"storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file",
|
|
5
|
-
"extensionLoadingError": "Failed to load extension \"{extension}\""
|
|
5
|
+
"extensionLoadingError": "Failed to load extension \"{extension}\"",
|
|
6
|
+
"insecureProtocol": "Cannot load extension from insecure protocol: {protocol}. Only HTTPS is allowed for remote extensions.",
|
|
7
|
+
"extensionDownloadFailed": "Failed to download extension from {url}",
|
|
8
|
+
"extensionNpmInstallFailed": "Failed to install npm extension: {package}",
|
|
9
|
+
"extensionSizeLimitExceeded": "Extension download size exceeds limit: {size} bytes > {limit} bytes"
|
|
6
10
|
}
|
|
7
11
|
},
|
|
8
12
|
"node": {
|
|
@@ -37,6 +41,11 @@
|
|
|
37
41
|
"extensionInitialisingEngineServer": "Initialising engine server for extension \"{extension}\"",
|
|
38
42
|
"extensionShutdown": "Shutdown extension \"{extension}\"",
|
|
39
43
|
"extendingEngine": "Extending Engine",
|
|
40
|
-
"extendingEngineServer": "Extending Engine Server"
|
|
44
|
+
"extendingEngineServer": "Extending Engine Server",
|
|
45
|
+
"extensionSecurityWarning": "SECURITY WARNING: Loading extension from external URL: {url}",
|
|
46
|
+
"extensionNpmInstalling": "Installing npm extension",
|
|
47
|
+
"extensionHttpsDownloading": "Downloading HTTPS extension",
|
|
48
|
+
"extensionCacheExpired": "Cache expired for extension: {url}",
|
|
49
|
+
"extensionForceRefresh": "Force refresh enabled for extension: {url}"
|
|
41
50
|
}
|
|
42
51
|
}
|