@highstate/backend 0.9.16 → 0.9.18

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 (125) hide show
  1. package/dist/chunk-NAAIDR4U.js +8499 -0
  2. package/dist/chunk-NAAIDR4U.js.map +1 -0
  3. package/dist/chunk-OU5OQBLB.js +74 -0
  4. package/dist/chunk-OU5OQBLB.js.map +1 -0
  5. package/dist/{chunk-WHALQHEZ.js → chunk-Y7DXREVO.js} +502 -774
  6. package/dist/chunk-Y7DXREVO.js.map +1 -0
  7. package/dist/highstate.manifest.json +4 -4
  8. package/dist/index.js +2979 -2233
  9. package/dist/index.js.map +1 -1
  10. package/dist/library/package-resolution-worker.js +7 -5
  11. package/dist/library/package-resolution-worker.js.map +1 -1
  12. package/dist/library/worker/main.js +40 -41
  13. package/dist/library/worker/main.js.map +1 -1
  14. package/dist/magic-string.es-5ABAC4JN.js +1292 -0
  15. package/dist/magic-string.es-5ABAC4JN.js.map +1 -0
  16. package/dist/shared/index.js +3 -216
  17. package/dist/shared/index.js.map +1 -1
  18. package/package.json +9 -6
  19. package/src/artifact/encryption.ts +47 -7
  20. package/src/artifact/factory.ts +2 -2
  21. package/src/artifact/local.ts +2 -6
  22. package/src/business/__traces__/secret/update-instance-secrets/create-and-delete-secrets-simultaneously.md +356 -0
  23. package/src/business/__traces__/secret/update-instance-secrets/create-new-secrets-for-instance.md +274 -0
  24. package/src/business/__traces__/secret/update-instance-secrets/delete-existing-secrets.md +223 -0
  25. package/src/business/__traces__/secret/update-instance-secrets/no-op-when-no-changes.md +147 -0
  26. package/src/business/__traces__/secret/update-instance-secrets/update-existing-secrets.md +280 -0
  27. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration-when-other-exists.md +360 -0
  28. package/src/business/__traces__/worker/update-unit-registrations/add-new-unit-registration.md +215 -0
  29. package/src/business/__traces__/worker/update-unit-registrations/create-multiple-workers-with-different-identities.md +427 -0
  30. package/src/business/__traces__/worker/update-unit-registrations/handle-nonexistent-registration-id-gracefully.md +217 -0
  31. package/src/business/__traces__/worker/update-unit-registrations/no-op-when-no-changes.md +132 -0
  32. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-changes.md +454 -0
  33. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-when-image-version-changes.md +426 -0
  34. package/src/business/__traces__/worker/update-unit-registrations/recreate-worker-with-same-identity-reuses-service-account.md +372 -0
  35. package/src/business/__traces__/worker/update-unit-registrations/remove-one-of-multiple-unit-registrations.md +383 -0
  36. package/src/business/__traces__/worker/update-unit-registrations/remove-unit-registration.md +245 -0
  37. package/src/business/__traces__/worker/update-unit-registrations/update-existing-unit-registration-when-params-change.md +174 -0
  38. package/src/business/__traces__/worker/update-unit-registrations/update-params-and-image-simultaneously.md +432 -0
  39. package/src/business/__traces__/worker/update-unit-registrations/worker-with-multiple-registrations-not-deleted-when-one-removed.md +220 -0
  40. package/src/business/artifact.ts +2 -1
  41. package/src/business/index.ts +1 -0
  42. package/src/business/instance-lock.ts +3 -2
  43. package/src/business/instance-state.ts +202 -60
  44. package/src/business/project-unlock.ts +41 -23
  45. package/src/business/project.ts +299 -0
  46. package/src/business/secret.test.ts +178 -0
  47. package/src/business/secret.ts +139 -45
  48. package/src/business/worker.test.ts +614 -0
  49. package/src/business/worker.ts +289 -52
  50. package/src/common/clock.ts +18 -0
  51. package/src/common/index.ts +3 -0
  52. package/src/common/random.ts +68 -0
  53. package/src/common/test/index.ts +2 -0
  54. package/src/common/test/render.ts +98 -0
  55. package/src/common/test/tracer.ts +359 -0
  56. package/src/config.ts +5 -1
  57. package/src/hotstate/manager.ts +8 -8
  58. package/src/hotstate/validation.ts +0 -1
  59. package/src/library/abstractions.ts +20 -11
  60. package/src/library/local.ts +6 -13
  61. package/src/library/worker/evaluator.ts +30 -34
  62. package/src/library/worker/loader.lite.ts +13 -0
  63. package/src/library/worker/main.ts +8 -8
  64. package/src/library/worker/protocol.ts +0 -11
  65. package/src/lock/index.ts +1 -0
  66. package/src/lock/manager.ts +17 -2
  67. package/src/lock/test.ts +108 -0
  68. package/src/orchestrator/manager.ts +17 -36
  69. package/src/orchestrator/operation-workset.ts +34 -37
  70. package/src/orchestrator/operation.ts +129 -74
  71. package/src/project/abstractions.ts +27 -51
  72. package/src/project/evaluation.ts +248 -0
  73. package/src/project/index.ts +1 -1
  74. package/src/project/local.ts +75 -127
  75. package/src/pubsub/manager.ts +21 -13
  76. package/src/runner/abstractions.ts +29 -9
  77. package/src/runner/artifact-env.ts +3 -3
  78. package/src/runner/local.ts +29 -19
  79. package/src/runner/pulumi.ts +4 -1
  80. package/src/services.ts +77 -24
  81. package/src/shared/models/backend/library.ts +4 -4
  82. package/src/shared/models/backend/project.ts +25 -6
  83. package/src/shared/models/backend/unlock-method.ts +1 -1
  84. package/src/shared/models/base.ts +1 -84
  85. package/src/shared/models/project/api-key.ts +5 -2
  86. package/src/shared/models/project/artifact.ts +3 -33
  87. package/src/shared/models/project/index.ts +1 -2
  88. package/src/shared/models/project/lock.ts +3 -3
  89. package/src/shared/models/project/model.ts +14 -0
  90. package/src/shared/models/project/operation.ts +3 -3
  91. package/src/shared/models/project/page.ts +3 -3
  92. package/src/shared/models/project/secret.ts +4 -18
  93. package/src/shared/models/project/service-account.ts +2 -2
  94. package/src/shared/models/project/state.ts +32 -15
  95. package/src/shared/models/project/terminal.ts +4 -5
  96. package/src/shared/models/project/trigger.ts +1 -1
  97. package/src/shared/models/project/unlock-method.ts +9 -2
  98. package/src/shared/models/project/worker.ts +9 -7
  99. package/src/shared/resolvers/graph-resolver.ts +41 -26
  100. package/src/shared/resolvers/input.ts +47 -5
  101. package/src/shared/resolvers/validation.ts +23 -7
  102. package/src/shared/utils/args.ts +25 -0
  103. package/src/shared/utils/index.ts +1 -0
  104. package/src/state/abstractions.ts +98 -259
  105. package/src/state/encryption.ts +39 -0
  106. package/src/state/index.ts +1 -0
  107. package/src/state/local/backend.ts +29 -222
  108. package/src/state/local/collection.ts +105 -86
  109. package/src/state/manager.ts +358 -287
  110. package/src/state/memory/backend.ts +70 -0
  111. package/src/state/memory/collection.ts +270 -0
  112. package/src/state/memory/index.ts +2 -0
  113. package/src/state/repository/repository.index.ts +1 -1
  114. package/src/state/repository/repository.ts +71 -22
  115. package/src/state/test.ts +457 -0
  116. package/src/unlock/abstractions.ts +49 -0
  117. package/src/unlock/index.ts +2 -0
  118. package/src/unlock/memory.ts +32 -0
  119. package/src/worker/manager.ts +28 -0
  120. package/dist/chunk-RCB4AFGD.js +0 -159
  121. package/dist/chunk-RCB4AFGD.js.map +0 -1
  122. package/dist/chunk-WHALQHEZ.js.map +0 -1
  123. package/src/project/manager.ts +0 -574
  124. package/src/shared/models/project/component.ts +0 -45
  125. package/src/shared/models/project/instance.ts +0 -74
@@ -0,0 +1,223 @@
1
+ ## arrange
2
+
3
+ ### <a id="trace-1"></a> 1. 💾 putItem
4
+
5
+ **Collection:** `projects`
6
+
7
+ **Key:** `"00000000-0011-7000-8000-413b6b3f3f3f"`
8
+
9
+ **Value:**
10
+
11
+ ```js
12
+ {
13
+ "id": "00000000-0011-7000-8000-413b6b3f3f3f",
14
+ "meta": {
15
+ "title": "Test"
16
+ },
17
+ "name": "test"
18
+ }
19
+ ```
20
+
21
+ ### <a id="trace-2"></a> 2. 💾 put
22
+
23
+ **Collection:** `project-name-index`
24
+
25
+ **Key:** `"test"`
26
+
27
+ **Value:**
28
+
29
+ `"00000000-0011-7000-8000-413b6b3f3f3f"`
30
+
31
+ ### <a id="trace-3"></a> 3. 💾 putItem
32
+
33
+ **Collection:** `secrets:00000000-0011-7000-8000-413b6b3f3f3f`
34
+
35
+ **Key:** `"00000000-0023-7000-8000-8b4d7d515151"`
36
+
37
+ **Value:**
38
+
39
+ ```js
40
+ {
41
+ "id": "00000000-0023-7000-8000-8b4d7d515151",
42
+ "meta": {},
43
+ "descriptor": {
44
+ "type": "instance",
45
+ "instanceId": "component1:test",
46
+ "secretName": "secret1"
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### <a id="trace-4"></a> 4. 💾 put
52
+
53
+ **Collection:** `secret-content:00000000-0011-7000-8000-413b6b3f3f3f`
54
+
55
+ **Key:** `"instance:component1:test:secret1"`
56
+
57
+ **Value:**
58
+
59
+ `"value"`
60
+
61
+ ### <a id="trace-5"></a> 5. 💾 put
62
+
63
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3f3f3f`
64
+
65
+ **Key:** `"instance:component1:test:secret1"`
66
+
67
+ **Value:**
68
+
69
+ `"00000000-0023-7000-8000-8b4d7d515151"`
70
+
71
+ ## act
72
+
73
+ ### <a id="trace-6"></a> 6. ✅ libraryBackend.loadLibrary
74
+
75
+ **Args:**
76
+
77
+ `undefined`
78
+
79
+ **Result:**
80
+
81
+ ```js
82
+ {
83
+ "components": {
84
+ "component1": {
85
+ "type": "component1",
86
+ "args": {},
87
+ "inputs": {},
88
+ "outputs": {},
89
+ "meta": {
90
+ "title": "Component1"
91
+ },
92
+ "definitionHash": null,
93
+ "source": {
94
+ "package": "test",
95
+ "path": "test"
96
+ },
97
+ "secrets": {
98
+ "secret1": {
99
+ "schema": {
100
+ "$schema": "http://json-schema.org/draft-07/schema#",
101
+ "type": "string"
102
+ },
103
+ "required": true,
104
+ "meta": {
105
+ "title": "Secret1"
106
+ },
107
+ "readonly": false,
108
+ "computed": false
109
+ },
110
+ "secret2": {
111
+ "schema": {
112
+ "$schema": "http://json-schema.org/draft-07/schema#",
113
+ "type": "string"
114
+ },
115
+ "required": true,
116
+ "meta": {
117
+ "title": "Secret2"
118
+ },
119
+ "readonly": false,
120
+ "computed": false
121
+ }
122
+ }
123
+ },
124
+ "component2": {
125
+ "type": "component2",
126
+ "args": {},
127
+ "inputs": {},
128
+ "outputs": {},
129
+ "meta": {
130
+ "title": "Component2"
131
+ },
132
+ "definitionHash": null,
133
+ "source": {
134
+ "package": "test",
135
+ "path": "test"
136
+ },
137
+ "secrets": {}
138
+ },
139
+ "component3": {
140
+ "type": "component3",
141
+ "args": {},
142
+ "inputs": {},
143
+ "outputs": {},
144
+ "meta": {
145
+ "title": "Component3"
146
+ },
147
+ "definitionHash": null
148
+ }
149
+ },
150
+ "entities": {}
151
+ }
152
+ ```
153
+
154
+ ### <a id="trace-7"></a> 7. 📖 get
155
+
156
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3f3f3f`
157
+
158
+ **Keys:**
159
+
160
+ `"instance:component1:test:secret1"`
161
+
162
+ **Result:** `"00000000-0023-7000-8000-8b4d7d515151"`
163
+
164
+ ### <a id="trace-8"></a> 8. đŸ—‘ī¸ delete
165
+
166
+ **Collection:** `secrets:00000000-0011-7000-8000-413b6b3f3f3f`
167
+
168
+ **Batch ID:** `1`, written at [11](#trace-11)
169
+
170
+ **Key:** `"00000000-0023-7000-8000-8b4d7d515151"`
171
+
172
+ ### <a id="trace-9"></a> 9. đŸ—‘ī¸ delete
173
+
174
+ **Collection:** `secret-content:00000000-0011-7000-8000-413b6b3f3f3f`
175
+
176
+ **Batch ID:** `1`, written at [11](#trace-11)
177
+
178
+ **Key:** `"instance:component1:test:secret1"`
179
+
180
+ ### <a id="trace-10"></a> 10. đŸ—‘ī¸ delete
181
+
182
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3f3f3f`
183
+
184
+ **Batch ID:** `1`, written at [11](#trace-11)
185
+
186
+ **Key:** `"instance:component1:test:secret1"`
187
+
188
+ ### <a id="trace-11"></a> 11. 💾 write [8](#trace-8), [9](#trace-9), [10](#trace-10)
189
+
190
+ ### <a id="trace-12"></a> 12. ✅ InstanceStateService.updateStateSecretNames
191
+
192
+ **Args:**
193
+
194
+ `"00000000-0011-7000-8000-413b6b3f3f3f"`
195
+
196
+ `"component1:test"`
197
+
198
+ ```js
199
+ []
200
+ ```
201
+
202
+ ```js
203
+ [
204
+ "secret1"
205
+ ]
206
+ ```
207
+
208
+ `true`
209
+
210
+ ### <a id="trace-13"></a> 13. â„šī¸ info
211
+
212
+ `updated instance secrets for instance "component1:test"`
213
+
214
+ **Data:**
215
+
216
+ ```js
217
+ {
218
+ "projectId": "00000000-0011-7000-8000-413b6b3f3f3f",
219
+ "instanceId": "component1:test",
220
+ "changedCount": 0,
221
+ "deletedCount": 1
222
+ }
223
+ ```
@@ -0,0 +1,147 @@
1
+ ## arrange
2
+
3
+ ### <a id="trace-1"></a> 1. 💾 putItem
4
+
5
+ **Collection:** `projects`
6
+
7
+ **Key:** `"00000000-0011-7000-8000-413b6b413f3f"`
8
+
9
+ **Value:**
10
+
11
+ ```js
12
+ {
13
+ "id": "00000000-0011-7000-8000-413b6b413f3f",
14
+ "meta": {
15
+ "title": "Test"
16
+ },
17
+ "name": "test"
18
+ }
19
+ ```
20
+
21
+ ### <a id="trace-2"></a> 2. 💾 put
22
+
23
+ **Collection:** `project-name-index`
24
+
25
+ **Key:** `"test"`
26
+
27
+ **Value:**
28
+
29
+ `"00000000-0011-7000-8000-413b6b413f3f"`
30
+
31
+ ## act
32
+
33
+ ### <a id="trace-3"></a> 3. ✅ libraryBackend.loadLibrary
34
+
35
+ **Args:**
36
+
37
+ `undefined`
38
+
39
+ **Result:**
40
+
41
+ ```js
42
+ {
43
+ "components": {
44
+ "component1": {
45
+ "type": "component1",
46
+ "args": {},
47
+ "inputs": {},
48
+ "outputs": {},
49
+ "meta": {
50
+ "title": "Component1"
51
+ },
52
+ "definitionHash": null,
53
+ "source": {
54
+ "package": "test",
55
+ "path": "test"
56
+ },
57
+ "secrets": {
58
+ "secret1": {
59
+ "schema": {
60
+ "$schema": "http://json-schema.org/draft-07/schema#",
61
+ "type": "string"
62
+ },
63
+ "required": true,
64
+ "meta": {
65
+ "title": "Secret1"
66
+ },
67
+ "readonly": false,
68
+ "computed": false
69
+ },
70
+ "secret2": {
71
+ "schema": {
72
+ "$schema": "http://json-schema.org/draft-07/schema#",
73
+ "type": "string"
74
+ },
75
+ "required": true,
76
+ "meta": {
77
+ "title": "Secret2"
78
+ },
79
+ "readonly": false,
80
+ "computed": false
81
+ }
82
+ }
83
+ },
84
+ "component2": {
85
+ "type": "component2",
86
+ "args": {},
87
+ "inputs": {},
88
+ "outputs": {},
89
+ "meta": {
90
+ "title": "Component2"
91
+ },
92
+ "definitionHash": null,
93
+ "source": {
94
+ "package": "test",
95
+ "path": "test"
96
+ },
97
+ "secrets": {}
98
+ },
99
+ "component3": {
100
+ "type": "component3",
101
+ "args": {},
102
+ "inputs": {},
103
+ "outputs": {},
104
+ "meta": {
105
+ "title": "Component3"
106
+ },
107
+ "definitionHash": null
108
+ }
109
+ },
110
+ "entities": {}
111
+ }
112
+ ```
113
+
114
+ ### <a id="trace-4"></a> 4. 💾 write
115
+
116
+ ### <a id="trace-5"></a> 5. ✅ InstanceStateService.updateStateSecretNames
117
+
118
+ **Args:**
119
+
120
+ `"00000000-0011-7000-8000-413b6b413f3f"`
121
+
122
+ `"component1:test"`
123
+
124
+ ```js
125
+ []
126
+ ```
127
+
128
+ ```js
129
+ []
130
+ ```
131
+
132
+ `true`
133
+
134
+ ### <a id="trace-6"></a> 6. â„šī¸ info
135
+
136
+ `updated instance secrets for instance "component1:test"`
137
+
138
+ **Data:**
139
+
140
+ ```js
141
+ {
142
+ "projectId": "00000000-0011-7000-8000-413b6b413f3f",
143
+ "instanceId": "component1:test",
144
+ "changedCount": 0,
145
+ "deletedCount": 0
146
+ }
147
+ ```
@@ -0,0 +1,280 @@
1
+ ## arrange
2
+
3
+ ### <a id="trace-1"></a> 1. 💾 putItem
4
+
5
+ **Collection:** `projects`
6
+
7
+ **Key:** `"00000000-0011-7000-8000-413b6b3e3f3f"`
8
+
9
+ **Value:**
10
+
11
+ ```js
12
+ {
13
+ "id": "00000000-0011-7000-8000-413b6b3e3f3f",
14
+ "meta": {
15
+ "title": "Test"
16
+ },
17
+ "name": "test"
18
+ }
19
+ ```
20
+
21
+ ### <a id="trace-2"></a> 2. 💾 put
22
+
23
+ **Collection:** `project-name-index`
24
+
25
+ **Key:** `"test"`
26
+
27
+ **Value:**
28
+
29
+ `"00000000-0011-7000-8000-413b6b3e3f3f"`
30
+
31
+ ### <a id="trace-3"></a> 3. 💾 putItem
32
+
33
+ **Collection:** `secrets:00000000-0011-7000-8000-413b6b3e3f3f`
34
+
35
+ **Key:** `"00000000-0023-7000-8000-8b4d7d505151"`
36
+
37
+ **Value:**
38
+
39
+ ```js
40
+ {
41
+ "id": "00000000-0023-7000-8000-8b4d7d505151",
42
+ "meta": {},
43
+ "descriptor": {
44
+ "type": "instance",
45
+ "instanceId": "component1:test",
46
+ "secretName": "secret1"
47
+ }
48
+ }
49
+ ```
50
+
51
+ ### <a id="trace-4"></a> 4. 💾 put
52
+
53
+ **Collection:** `secret-content:00000000-0011-7000-8000-413b6b3e3f3f`
54
+
55
+ **Key:** `"instance:component1:test:secret1"`
56
+
57
+ **Value:**
58
+
59
+ `"value"`
60
+
61
+ ### <a id="trace-5"></a> 5. 💾 put
62
+
63
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3e3f3f`
64
+
65
+ **Key:** `"instance:component1:test:secret1"`
66
+
67
+ **Value:**
68
+
69
+ `"00000000-0023-7000-8000-8b4d7d505151"`
70
+
71
+ ## act
72
+
73
+ ### <a id="trace-6"></a> 6. ✅ libraryBackend.loadLibrary
74
+
75
+ **Args:**
76
+
77
+ `undefined`
78
+
79
+ **Result:**
80
+
81
+ ```js
82
+ {
83
+ "components": {
84
+ "component1": {
85
+ "type": "component1",
86
+ "args": {},
87
+ "inputs": {},
88
+ "outputs": {},
89
+ "meta": {
90
+ "title": "Component1"
91
+ },
92
+ "definitionHash": null,
93
+ "source": {
94
+ "package": "test",
95
+ "path": "test"
96
+ },
97
+ "secrets": {
98
+ "secret1": {
99
+ "schema": {
100
+ "$schema": "http://json-schema.org/draft-07/schema#",
101
+ "type": "string"
102
+ },
103
+ "required": true,
104
+ "meta": {
105
+ "title": "Secret1"
106
+ },
107
+ "readonly": false,
108
+ "computed": false
109
+ },
110
+ "secret2": {
111
+ "schema": {
112
+ "$schema": "http://json-schema.org/draft-07/schema#",
113
+ "type": "string"
114
+ },
115
+ "required": true,
116
+ "meta": {
117
+ "title": "Secret2"
118
+ },
119
+ "readonly": false,
120
+ "computed": false
121
+ }
122
+ }
123
+ },
124
+ "component2": {
125
+ "type": "component2",
126
+ "args": {},
127
+ "inputs": {},
128
+ "outputs": {},
129
+ "meta": {
130
+ "title": "Component2"
131
+ },
132
+ "definitionHash": null,
133
+ "source": {
134
+ "package": "test",
135
+ "path": "test"
136
+ },
137
+ "secrets": {}
138
+ },
139
+ "component3": {
140
+ "type": "component3",
141
+ "args": {},
142
+ "inputs": {},
143
+ "outputs": {},
144
+ "meta": {
145
+ "title": "Component3"
146
+ },
147
+ "definitionHash": null
148
+ }
149
+ },
150
+ "entities": {}
151
+ }
152
+ ```
153
+
154
+ ### <a id="trace-7"></a> 7. 📸 snapshot, used by [8](#trace-8), [9](#trace-9)
155
+
156
+ ### <a id="trace-8"></a> 8. 📖 get
157
+
158
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3e3f3f`
159
+
160
+ **Keys:**
161
+
162
+ `"instance:component1:test:secret1"`
163
+
164
+ **Result:** `"00000000-0023-7000-8000-8b4d7d505151"`
165
+
166
+ **Snapshot ID:** `1`, captured at [7](#trace-7)
167
+
168
+ ### <a id="trace-9"></a> 9. 📖 get
169
+
170
+ **Collection:** `secrets:00000000-0011-7000-8000-413b6b3e3f3f`
171
+
172
+ **Keys:**
173
+
174
+ `"00000000-0023-7000-8000-8b4d7d505151"`
175
+
176
+ **Result:**
177
+
178
+ ```js
179
+ {
180
+ "id": "00000000-0023-7000-8000-8b4d7d505151",
181
+ "meta": {
182
+ "createdAt": 0,
183
+ "updatedAt": 0
184
+ },
185
+ "descriptor": {
186
+ "type": "instance",
187
+ "instanceId": "component1:test",
188
+ "secretName": "secret1"
189
+ }
190
+ }
191
+ ```
192
+
193
+ **Snapshot ID:** `1`, captured at [7](#trace-7)
194
+
195
+ ### <a id="trace-10"></a> 10. 💾 putItem
196
+
197
+ **Collection:** `secrets:00000000-0011-7000-8000-413b6b3e3f3f`
198
+
199
+ **Batch ID:** `1`, written at [13](#trace-13)
200
+
201
+ **Key:** `"00000000-0023-7000-8000-8b4d7d505151"`
202
+
203
+ **Value:**
204
+
205
+ ```js
206
+ {
207
+ "id": "00000000-0023-7000-8000-8b4d7d505151",
208
+ "descriptor": {
209
+ "type": "instance",
210
+ "instanceId": "component1:test",
211
+ "secretName": "secret1"
212
+ },
213
+ "meta": {
214
+ "createdAt": 0,
215
+ "updatedAt": 0,
216
+ "title": "Secret1"
217
+ }
218
+ }
219
+ ```
220
+
221
+ ### <a id="trace-11"></a> 11. 💾 put
222
+
223
+ **Collection:** `secret-content:00000000-0011-7000-8000-413b6b3e3f3f`
224
+
225
+ **Batch ID:** `1`, written at [13](#trace-13)
226
+
227
+ **Key:** `"instance:component1:test:secret1"`
228
+
229
+ **Value:**
230
+
231
+ `"new-value"`
232
+
233
+ ### <a id="trace-12"></a> 12. 💾 put
234
+
235
+ **Collection:** `secret-index:00000000-0011-7000-8000-413b6b3e3f3f`
236
+
237
+ **Batch ID:** `1`, written at [13](#trace-13)
238
+
239
+ **Key:** `"instance:component1:test:secret1"`
240
+
241
+ **Value:**
242
+
243
+ `"00000000-0023-7000-8000-8b4d7d505151"`
244
+
245
+ ### <a id="trace-13"></a> 13. 💾 write [10](#trace-10), [11](#trace-11), [12](#trace-12)
246
+
247
+ ### <a id="trace-14"></a> 14. ✅ InstanceStateService.updateStateSecretNames
248
+
249
+ **Args:**
250
+
251
+ `"00000000-0011-7000-8000-413b6b3e3f3f"`
252
+
253
+ `"component1:test"`
254
+
255
+ ```js
256
+ [
257
+ "secret1"
258
+ ]
259
+ ```
260
+
261
+ ```js
262
+ []
263
+ ```
264
+
265
+ `true`
266
+
267
+ ### <a id="trace-15"></a> 15. â„šī¸ info
268
+
269
+ `updated instance secrets for instance "component1:test"`
270
+
271
+ **Data:**
272
+
273
+ ```js
274
+ {
275
+ "projectId": "00000000-0011-7000-8000-413b6b3e3f3f",
276
+ "instanceId": "component1:test",
277
+ "changedCount": 1,
278
+ "deletedCount": 0
279
+ }
280
+ ```