@highstate/backend 0.6.0 → 0.6.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/index.d.ts
CHANGED
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
2
2
|
import { WhoAmIResult, Stack, ConfigMap } from '@pulumi/pulumi/automation';
|
3
3
|
import { Logger } from 'pino';
|
4
4
|
import { ComponentModel, Entity, InstanceModel, CompositeInstance, UnitSource } from '@highstate/contract';
|
5
|
-
import { H as HubModel, I as InstanceModelPatch, a as HubModelPatch, P as ProjectOperation, b as InstanceState, T as TerminalSession, c as InstanceStatus, d as InstanceStatePatch, e as InstancePageBlock, f as InstanceTerminal, g as ProjectOperationRequest } from './terminal-
|
5
|
+
import { H as HubModel, I as InstanceModelPatch, a as HubModelPatch, P as ProjectOperation, b as InstanceState, T as TerminalSession, c as InstanceStatus, d as InstanceStatePatch, e as InstancePageBlock, f as InstanceTerminal, g as ProjectOperationRequest } from './terminal-NNJYvGqi.js';
|
6
6
|
import { BetterLock } from 'better-lock/dist/better_lock';
|
7
7
|
import { Stream, Writable } from 'node:stream';
|
8
8
|
|
package/dist/index.mjs
CHANGED
@@ -10,7 +10,7 @@ import Watcher from 'watcher';
|
|
10
10
|
import { resolve } from 'import-meta-resolve';
|
11
11
|
import { readdir, readFile, writeFile, mkdir } from 'node:fs/promises';
|
12
12
|
import { getInstanceId, isUnitModel, parseInstanceId } from '@highstate/contract';
|
13
|
-
import { h as hubModelSchema, i as instanceModelSchema, c as createInputResolver, a as createInputHashResolver, b as createInstanceState, d as instanceTerminalSchema, e as instancePageSchema, f as instanceFileSchema, g as instanceStatusFieldSchema, j as instanceTriggerSchema, k as compositeInstanceSchema, p as projectOperationSchema, l as instanceStateSchema, m as isFinalOperationStatus, t as terminalSessionSchema, n as applyPartialInstanceState, o as createInstanceStateFrontendPatch } from './terminal-
|
13
|
+
import { h as hubModelSchema, i as instanceModelSchema, c as createInputResolver, a as createInputHashResolver, b as createInstanceState, d as instanceTerminalSchema, e as instancePageSchema, f as instanceFileSchema, g as instanceStatusFieldSchema, j as instanceTriggerSchema, k as compositeInstanceSchema, p as projectOperationSchema, l as instanceStateSchema, m as isFinalOperationStatus, t as terminalSessionSchema, n as applyPartialInstanceState, o as createInstanceStateFrontendPatch } from './terminal-C4MfopTF.mjs';
|
14
14
|
import { sha256 } from 'crypto-hash';
|
15
15
|
import 'ajv';
|
16
16
|
import { Readable, PassThrough } from 'node:stream';
|
@@ -956,10 +956,16 @@ done
|
|
956
956
|
for key in "\${filesKeys[@]}"; do
|
957
957
|
isBinary=$(jq -r ".files[\\"$key\\"].isBinary // false" <<<"$data")
|
958
958
|
content=$(jq -r ".files[\\"$key\\"].content" <<<"$data")
|
959
|
+
mode=$(jq -r ".files[\\"$key\\"].mode // 0" <<<"$data")
|
960
|
+
|
959
961
|
if [ "$isBinary" = "true" ]; then
|
960
|
-
echo
|
962
|
+
echo "$content" | base64 -d > "$key"
|
961
963
|
else
|
962
|
-
echo
|
964
|
+
echo "$content" > "$key"
|
965
|
+
fi
|
966
|
+
|
967
|
+
if [ "$mode" -ne 0 ]; then
|
968
|
+
chmod $(printf "%o" "$mode") "$key"
|
963
969
|
fi
|
964
970
|
done
|
965
971
|
|
package/dist/shared/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { H as HubModel, b as InstanceState } from '../terminal-
|
2
|
-
export { C as CompositeInstance, a as HubModelPatch, J as InstanceFileMeta, I as InstanceModelPatch, e as InstancePageBlock, G as InstancePageMeta, d as InstanceStatePatch, c as InstanceStatus, F as InstanceStatusField, f as InstanceTerminal, L as InstanceTrigger, M as InstanceTriggerInvocation, K as InstanceTriggerSpec, X as OperationStatus, W as OperationType, P as ProjectOperation, g as ProjectOperationRequest, T as TerminalSession, O as applyPartialInstanceState, l as compositeInstanceSchema, N as createInstanceState, Q as createInstanceStateFrontendPatch, h as hubInstanceInputSchema, m as hubModelPatchSchema, n as hubModelSchema, r as instanceFileMetaSchema, s as instanceFileSchema, i as instanceInputSchema, j as instanceModelPatchSchema, k as instanceModelSchema, t as instancePageBlockSchema, u as instancePageMetaSchema, v as instancePageSchema, E as instanceStatePatchSchema, D as instanceStateSchema, q as instanceStatusFieldSchema, o as instanceStatusSchema, x as instanceTerminalFileSchema, w as instanceTerminalMetaSchema, y as instanceTerminalSchema, B as instanceTriggerInvocationSchema, A as instanceTriggerSchema, z as instanceTriggerSpecSchema, Y as isFinalOperationStatus, S as operationStatusSchema, R as operationTypeSchema, p as positionSchema, V as projectOperationRequestSchema, U as projectOperationSchema, Z as terminalSessionSchema } from '../terminal-
|
1
|
+
import { H as HubModel, b as InstanceState } from '../terminal-NNJYvGqi.js';
|
2
|
+
export { C as CompositeInstance, a as HubModelPatch, J as InstanceFileMeta, I as InstanceModelPatch, e as InstancePageBlock, G as InstancePageMeta, d as InstanceStatePatch, c as InstanceStatus, F as InstanceStatusField, f as InstanceTerminal, L as InstanceTrigger, M as InstanceTriggerInvocation, K as InstanceTriggerSpec, X as OperationStatus, W as OperationType, P as ProjectOperation, g as ProjectOperationRequest, T as TerminalSession, O as applyPartialInstanceState, l as compositeInstanceSchema, N as createInstanceState, Q as createInstanceStateFrontendPatch, h as hubInstanceInputSchema, m as hubModelPatchSchema, n as hubModelSchema, r as instanceFileMetaSchema, s as instanceFileSchema, i as instanceInputSchema, j as instanceModelPatchSchema, k as instanceModelSchema, t as instancePageBlockSchema, u as instancePageMetaSchema, v as instancePageSchema, E as instanceStatePatchSchema, D as instanceStateSchema, q as instanceStatusFieldSchema, o as instanceStatusSchema, x as instanceTerminalFileSchema, w as instanceTerminalMetaSchema, y as instanceTerminalSchema, B as instanceTriggerInvocationSchema, A as instanceTriggerSchema, z as instanceTriggerSpecSchema, Y as isFinalOperationStatus, S as operationStatusSchema, R as operationTypeSchema, p as positionSchema, V as projectOperationRequestSchema, U as projectOperationSchema, Z as terminalSessionSchema } from '../terminal-NNJYvGqi.js';
|
3
3
|
import { Logger } from 'pino';
|
4
4
|
import { InstanceModel, ComponentModel, InstanceInput } from '@highstate/contract';
|
5
5
|
import 'zod';
|
package/dist/shared/index.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { q as defineGraphResolver } from '../terminal-
|
2
|
-
export { J as CircularDependencyError, n as applyPartialInstanceState, k as compositeInstanceSchema, K as createDefaultGraphResolverBackend, a as createInputHashResolver, c as createInputResolver, b as createInstanceState, o as createInstanceStateFrontendPatch, O as getMatchedInjectionInstanceInputs, L as getResolvedHubInputs, N as getResolvedInjectionInstanceInputs, M as getResolvedInstanceInputs, u as hubInstanceInputSchema, w as hubModelPatchSchema, h as hubModelSchema, y as instanceFileMetaSchema, f as instanceFileSchema, s as instanceInputSchema, v as instanceModelPatchSchema, i as instanceModelSchema, z as instancePageBlockSchema, A as instancePageMetaSchema, e as instancePageSchema, F as instanceStatePatchSchema, l as instanceStateSchema, g as instanceStatusFieldSchema, x as instanceStatusSchema, C as instanceTerminalFileSchema, B as instanceTerminalMetaSchema, d as instanceTerminalSchema, E as instanceTriggerInvocationSchema, j as instanceTriggerSchema, D as instanceTriggerSpecSchema, m as isFinalOperationStatus, H as operationStatusSchema, G as operationTypeSchema, r as positionSchema, I as projectOperationRequestSchema, p as projectOperationSchema, t as terminalSessionSchema } from '../terminal-
|
1
|
+
import { q as defineGraphResolver } from '../terminal-C4MfopTF.mjs';
|
2
|
+
export { J as CircularDependencyError, n as applyPartialInstanceState, k as compositeInstanceSchema, K as createDefaultGraphResolverBackend, a as createInputHashResolver, c as createInputResolver, b as createInstanceState, o as createInstanceStateFrontendPatch, O as getMatchedInjectionInstanceInputs, L as getResolvedHubInputs, N as getResolvedInjectionInstanceInputs, M as getResolvedInstanceInputs, u as hubInstanceInputSchema, w as hubModelPatchSchema, h as hubModelSchema, y as instanceFileMetaSchema, f as instanceFileSchema, s as instanceInputSchema, v as instanceModelPatchSchema, i as instanceModelSchema, z as instancePageBlockSchema, A as instancePageMetaSchema, e as instancePageSchema, F as instanceStatePatchSchema, l as instanceStateSchema, g as instanceStatusFieldSchema, x as instanceStatusSchema, C as instanceTerminalFileSchema, B as instanceTerminalMetaSchema, d as instanceTerminalSchema, E as instanceTriggerInvocationSchema, j as instanceTriggerSchema, D as instanceTriggerSpecSchema, m as isFinalOperationStatus, H as operationStatusSchema, G as operationTypeSchema, r as positionSchema, I as projectOperationRequestSchema, p as projectOperationSchema, t as terminalSessionSchema } from '../terminal-C4MfopTF.mjs';
|
3
3
|
import { Ajv } from 'ajv';
|
4
4
|
import 'zod';
|
5
5
|
import 'remeda';
|
@@ -101,7 +101,8 @@ const instanceTerminalMetaSchema = z.object({
|
|
101
101
|
});
|
102
102
|
const instanceTerminalFileSchema = z.object({
|
103
103
|
content: z.string().optional(),
|
104
|
-
isBinary: z.boolean().optional()
|
104
|
+
isBinary: z.boolean().optional(),
|
105
|
+
mode: z.number().optional()
|
105
106
|
});
|
106
107
|
const instanceTerminalSchema = z.object({
|
107
108
|
...instanceTerminalMetaSchema.shape,
|
@@ -836,12 +836,15 @@ declare const instanceTerminalMetaSchema: z.ZodObject<{
|
|
836
836
|
declare const instanceTerminalFileSchema: z.ZodObject<{
|
837
837
|
content: z.ZodOptional<z.ZodString>;
|
838
838
|
isBinary: z.ZodOptional<z.ZodBoolean>;
|
839
|
+
mode: z.ZodOptional<z.ZodNumber>;
|
839
840
|
}, "strip", z.ZodTypeAny, {
|
840
841
|
isBinary?: boolean | undefined;
|
841
842
|
content?: string | undefined;
|
843
|
+
mode?: number | undefined;
|
842
844
|
}, {
|
843
845
|
isBinary?: boolean | undefined;
|
844
846
|
content?: string | undefined;
|
847
|
+
mode?: number | undefined;
|
845
848
|
}>;
|
846
849
|
declare const instanceTerminalSchema: z.ZodObject<{
|
847
850
|
image: z.ZodString;
|
@@ -851,12 +854,15 @@ declare const instanceTerminalSchema: z.ZodObject<{
|
|
851
854
|
files: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
852
855
|
content: z.ZodOptional<z.ZodString>;
|
853
856
|
isBinary: z.ZodOptional<z.ZodBoolean>;
|
857
|
+
mode: z.ZodOptional<z.ZodNumber>;
|
854
858
|
}, "strip", z.ZodTypeAny, {
|
855
859
|
isBinary?: boolean | undefined;
|
856
860
|
content?: string | undefined;
|
861
|
+
mode?: number | undefined;
|
857
862
|
}, {
|
858
863
|
isBinary?: boolean | undefined;
|
859
864
|
content?: string | undefined;
|
865
|
+
mode?: number | undefined;
|
860
866
|
}>>>;
|
861
867
|
name: z.ZodString;
|
862
868
|
title: z.ZodString;
|
@@ -872,6 +878,7 @@ declare const instanceTerminalSchema: z.ZodObject<{
|
|
872
878
|
files?: Record<string, {
|
873
879
|
isBinary?: boolean | undefined;
|
874
880
|
content?: string | undefined;
|
881
|
+
mode?: number | undefined;
|
875
882
|
}> | undefined;
|
876
883
|
}, {
|
877
884
|
name: string;
|
@@ -884,6 +891,7 @@ declare const instanceTerminalSchema: z.ZodObject<{
|
|
884
891
|
files?: Record<string, {
|
885
892
|
isBinary?: boolean | undefined;
|
886
893
|
content?: string | undefined;
|
894
|
+
mode?: number | undefined;
|
887
895
|
}> | undefined;
|
888
896
|
}>;
|
889
897
|
declare const instanceTriggerSpecSchema: z.ZodUnion<[z.ZodObject<{
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@highstate/backend",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.1",
|
4
4
|
"type": "module",
|
5
5
|
"module": "dist/index.mjs",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"build": "pkgroll --tsconfig=tsconfig.build.json"
|
28
28
|
},
|
29
29
|
"dependencies": {
|
30
|
-
"@highstate/contract": "^0.6.
|
30
|
+
"@highstate/contract": "^0.6.1",
|
31
31
|
"@types/node": "^22.10.1",
|
32
32
|
"ajv": "^8.17.1",
|
33
33
|
"better-lock": "^3.2.0",
|
@@ -65,5 +65,5 @@
|
|
65
65
|
"rollup": "^4.28.1",
|
66
66
|
"typescript": "^5.7.2"
|
67
67
|
},
|
68
|
-
"gitHead": "
|
68
|
+
"gitHead": "afe736f7e93b7fcfbae97e2d6e35b07175a8fc76"
|
69
69
|
}
|