@remotion/studio-server 4.0.501 → 4.0.503
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/codemods/update-inline-caption-patches.d.ts +1 -11
- package/dist/codemods/update-inline-caption-patches.js +2 -183
- package/dist/codemods/update-sequence-props/update-sequence-props.d.ts +2 -35
- package/dist/codemods/update-sequence-props/update-sequence-props.js +7 -720
- package/dist/detect-outdated-remotion-skills.d.ts +25 -0
- package/dist/detect-outdated-remotion-skills.js +73 -0
- package/dist/helpers/custom-editor.d.ts +37 -0
- package/dist/helpers/custom-editor.js +167 -0
- package/dist/helpers/editor-registry.d.ts +18 -0
- package/dist/helpers/editor-registry.js +500 -0
- package/dist/helpers/open-in-editor.d.ts +3 -4
- package/dist/helpers/open-in-editor.js +5 -75
- package/dist/helpers/resolve-composition-component.js +18 -6
- package/dist/helpers/resolve-editor.d.ts +27 -0
- package/dist/helpers/resolve-editor.js +90 -0
- package/dist/helpers/resolve-file-inside-project.d.ts +2 -0
- package/dist/helpers/resolve-file-inside-project.js +5 -2
- package/dist/index.d.ts +17 -1
- package/dist/index.js +9 -1
- package/dist/preview-server/api-routes.js +6 -1
- package/dist/preview-server/api-types.d.ts +2 -1
- package/dist/preview-server/element-install-state.d.ts +19 -0
- package/dist/preview-server/element-install-state.js +46 -1
- package/dist/preview-server/handler.d.ts +3 -1
- package/dist/preview-server/handler.js +3 -2
- package/dist/preview-server/parse-body.d.ts +6 -1
- package/dist/preview-server/parse-body.js +60 -9
- package/dist/preview-server/routes/can-update-default-props.d.ts +1 -1
- package/dist/preview-server/routes/can-update-default-props.js +5 -132
- package/dist/preview-server/routes/can-update-sequence-props.d.ts +3 -2
- package/dist/preview-server/routes/can-update-sequence-props.js +52 -9
- package/dist/preview-server/routes/default-editor.d.ts +8 -0
- package/dist/preview-server/routes/default-editor.js +131 -0
- package/dist/preview-server/routes/delete-effect-keyframe.d.ts +3 -0
- package/dist/preview-server/routes/delete-effect-keyframe.js +89 -0
- package/dist/preview-server/routes/delete-sequence-keyframe.d.ts +3 -0
- package/dist/preview-server/routes/delete-sequence-keyframe.js +82 -0
- package/dist/preview-server/routes/element-install-plan.d.ts +32 -0
- package/dist/preview-server/routes/element-install-plan.js +122 -0
- package/dist/preview-server/routes/insert-element.d.ts +1 -1
- package/dist/preview-server/routes/insert-element.js +68 -107
- package/dist/preview-server/routes/insert-jsx-element.js +5 -5
- package/dist/preview-server/routes/open-in-editor.d.ts +5 -1
- package/dist/preview-server/routes/open-in-editor.js +42 -12
- package/dist/preview-server/routes/prepare-element-install.d.ts +3 -0
- package/dist/preview-server/routes/prepare-element-install.js +25 -0
- package/dist/preview-server/routes/safe-element-install-path.d.ts +9 -0
- package/dist/preview-server/routes/safe-element-install-path.js +58 -0
- package/dist/preview-server/routes/save-props-mutex.d.ts +1 -0
- package/dist/preview-server/routes/save-props-mutex.js +11 -0
- package/dist/preview-server/sequence-props-watchers.js +2 -1
- package/dist/preview-server/start-server.d.ts +2 -0
- package/dist/preview-server/start-server.js +1 -0
- package/dist/preview-server/studio-protocol/handle-discovery.d.ts +11 -0
- package/dist/preview-server/studio-protocol/handle-discovery.js +106 -0
- package/dist/preview-server/studio-protocol/handle-install.d.ts +10 -0
- package/dist/preview-server/studio-protocol/handle-install.js +147 -0
- package/dist/preview-server/studio-protocol/origin-policy.d.ts +11 -0
- package/dist/preview-server/studio-protocol/origin-policy.js +43 -0
- package/dist/preview-server/studio-protocol/protocol-response.d.ts +7 -0
- package/dist/preview-server/studio-protocol/protocol-response.js +13 -0
- package/dist/preview-server/update-available.d.ts +6 -0
- package/dist/preview-server/update-available.js +30 -4
- package/dist/remotion-skill-names.d.ts +2 -0
- package/dist/remotion-skill-names.js +16 -0
- package/dist/routes.d.ts +3 -1
- package/dist/routes.js +19 -157
- package/dist/start-studio.d.ts +3 -1
- package/dist/start-studio.js +2 -1
- package/package.json +9 -8
|
@@ -1,727 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.updateSequenceProps = exports.updateMultipleSequenceProps = exports.updateSequencePropsAst = void 0;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const css_shorthand_properties_1 = require("../../helpers/css-shorthand-properties");
|
|
40
|
-
const video_config_numeric_expression_1 = require("../../helpers/video-config-numeric-expression");
|
|
41
|
-
const video_config_values_1 = require("../../helpers/video-config-values");
|
|
42
|
-
const can_update_sequence_props_1 = require("../../preview-server/routes/can-update-sequence-props");
|
|
4
|
+
const studio_codemods_1 = require("@remotion/studio-codemods");
|
|
5
|
+
Object.defineProperty(exports, "updateSequencePropsAst", { enumerable: true, get: function () { return studio_codemods_1.updateSequencePropsAst; } });
|
|
43
6
|
const format_file_content_1 = require("../format-file-content");
|
|
44
|
-
const parse_ast_1 = require("../parse-ast");
|
|
45
|
-
const update_nested_prop_1 = require("../update-nested-prop");
|
|
46
|
-
const b = recast.types.builders;
|
|
47
|
-
const removeVariantKey = ({ node, variantKey, }) => {
|
|
48
|
-
var _a;
|
|
49
|
-
const dotIndex = variantKey.indexOf('.');
|
|
50
|
-
if (dotIndex === -1) {
|
|
51
|
-
const idx = (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.findIndex((a) => a.type === 'JSXAttribute' &&
|
|
52
|
-
a.name.type === 'JSXIdentifier' &&
|
|
53
|
-
a.name.name === variantKey);
|
|
54
|
-
if (idx !== undefined && idx !== -1 && node.attributes) {
|
|
55
|
-
node.attributes.splice(idx, 1);
|
|
56
|
-
}
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
(0, update_nested_prop_1.updateNestedProp)({
|
|
60
|
-
node,
|
|
61
|
-
parentKey: variantKey.slice(0, dotIndex),
|
|
62
|
-
childKey: variantKey.slice(dotIndex + 1),
|
|
63
|
-
value: undefined,
|
|
64
|
-
defaultValue: null,
|
|
65
|
-
isDefault: true,
|
|
66
|
-
createValueExpression: null,
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
const snapshotTopLevelAttrs = (node) => {
|
|
70
|
-
var _a;
|
|
71
|
-
const result = new Map();
|
|
72
|
-
for (const a of (_a = node.attributes) !== null && _a !== void 0 ? _a : []) {
|
|
73
|
-
if (a.type === 'JSXAttribute' && a.name.type === 'JSXIdentifier') {
|
|
74
|
-
const { name } = a.name;
|
|
75
|
-
const printed = recast
|
|
76
|
-
.print(a)
|
|
77
|
-
.code.replace(/\s+/g, ' ')
|
|
78
|
-
.replace(/,(\s*[}\]])/g, '$1')
|
|
79
|
-
.trim();
|
|
80
|
-
const prefix = `${name}=`;
|
|
81
|
-
let valueOnly = printed.startsWith(prefix)
|
|
82
|
-
? printed.slice(prefix.length)
|
|
83
|
-
: printed;
|
|
84
|
-
if (valueOnly.startsWith('{') && valueOnly.endsWith('}')) {
|
|
85
|
-
valueOnly = valueOnly.slice(1, -1).trim();
|
|
86
|
-
}
|
|
87
|
-
result.set(name, valueOnly);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
return result;
|
|
91
|
-
};
|
|
92
|
-
const escapeJsxText = (value) => {
|
|
93
|
-
return value
|
|
94
|
-
.replace(/&/g, '&')
|
|
95
|
-
.replace(/</g, '<')
|
|
96
|
-
.replace(/>/g, '>')
|
|
97
|
-
.replace(/{/g, '{')
|
|
98
|
-
.replace(/}/g, '}');
|
|
99
|
-
};
|
|
100
|
-
const findChildrenAttribute = (node) => {
|
|
101
|
-
var _a;
|
|
102
|
-
return (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.find((attr) => {
|
|
103
|
-
return (attr.type === 'JSXAttribute' &&
|
|
104
|
-
attr.name.type === 'JSXIdentifier' &&
|
|
105
|
-
attr.name.name === 'children');
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
const updateJsxTextContent = ({ jsxElement, value, }) => {
|
|
109
|
-
const nextValue = String(value !== null && value !== void 0 ? value : '');
|
|
110
|
-
const staticChildrenAttribute = (0, can_update_sequence_props_1.getStaticJsxChildrenAttribute)(jsxElement.openingElement);
|
|
111
|
-
if (staticChildrenAttribute) {
|
|
112
|
-
const childrenAttribute = findChildrenAttribute(jsxElement.openingElement);
|
|
113
|
-
if (!childrenAttribute) {
|
|
114
|
-
throw new Error('Expected static children attribute to exist');
|
|
115
|
-
}
|
|
116
|
-
childrenAttribute.value = b.stringLiteral(nextValue);
|
|
117
|
-
return staticChildrenAttribute.value;
|
|
118
|
-
}
|
|
119
|
-
if ((0, can_update_sequence_props_1.hasJsxChildrenAttribute)(jsxElement.openingElement)) {
|
|
120
|
-
throw new Error('Cannot update text content because the children attribute is not static text');
|
|
121
|
-
}
|
|
122
|
-
const staticTextContent = (0, can_update_sequence_props_1.getStaticJsxTextContent)(jsxElement);
|
|
123
|
-
if (!staticTextContent) {
|
|
124
|
-
throw new Error('Cannot update text content because JSX children are not static text');
|
|
125
|
-
}
|
|
126
|
-
const canRepresentAsJsxText = staticTextContent.kind === 'jsx-text' &&
|
|
127
|
-
!nextValue.includes('\n') &&
|
|
128
|
-
nextValue.trim() === nextValue;
|
|
129
|
-
if (canRepresentAsJsxText) {
|
|
130
|
-
jsxElement.children = [
|
|
131
|
-
b.jsxText(escapeJsxText(nextValue)),
|
|
132
|
-
];
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
jsxElement.children = [
|
|
136
|
-
b.jsxExpressionContainer(b.stringLiteral(nextValue)),
|
|
137
|
-
];
|
|
138
|
-
}
|
|
139
|
-
return staticTextContent.value;
|
|
140
|
-
};
|
|
141
|
-
const collectTopLevelIdentifierNames = (ast) => {
|
|
142
|
-
const names = new Set();
|
|
143
|
-
recast.types.visit(ast, {
|
|
144
|
-
visitIdentifier(path) {
|
|
145
|
-
names.add(path.node.name);
|
|
146
|
-
this.traverse(path);
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
return names;
|
|
150
|
-
};
|
|
151
|
-
const toSafeIdentifier = (value) => {
|
|
152
|
-
const sanitized = value.replace(/[^a-zA-Z0-9_$]/g, '');
|
|
153
|
-
if (!sanitized) {
|
|
154
|
-
return 'loadGoogleFont';
|
|
155
|
-
}
|
|
156
|
-
return /^[a-zA-Z_$]/.test(sanitized) ? sanitized : `_${sanitized}`;
|
|
157
|
-
};
|
|
158
|
-
const getSafeLoadFontIdentifier = ({ font, usedNames, }) => {
|
|
159
|
-
const baseName = toSafeIdentifier(`load${font.importName}`);
|
|
160
|
-
if (!usedNames.has(baseName)) {
|
|
161
|
-
usedNames.add(baseName);
|
|
162
|
-
return baseName;
|
|
163
|
-
}
|
|
164
|
-
let index = 2;
|
|
165
|
-
while (usedNames.has(`${baseName}${index}`)) {
|
|
166
|
-
index++;
|
|
167
|
-
}
|
|
168
|
-
const name = `${baseName}${index}`;
|
|
169
|
-
usedNames.add(name);
|
|
170
|
-
return name;
|
|
171
|
-
};
|
|
172
|
-
const getImportedLoadFontIdentifier = ({ ast, font, }) => {
|
|
173
|
-
var _a;
|
|
174
|
-
var _b, _c;
|
|
175
|
-
const moduleName = `@remotion/google-fonts/${font.importName}`;
|
|
176
|
-
for (const statement of ast.program.body) {
|
|
177
|
-
if (statement.type !== 'ImportDeclaration' ||
|
|
178
|
-
statement.source.value !== moduleName) {
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
for (const specifier of (_b = statement.specifiers) !== null && _b !== void 0 ? _b : []) {
|
|
182
|
-
if (specifier.type === 'ImportSpecifier' &&
|
|
183
|
-
specifier.imported.type === 'Identifier' &&
|
|
184
|
-
specifier.imported.name === 'loadFont') {
|
|
185
|
-
return (_c = (_a = specifier.local) === null || _a === void 0 ? void 0 : _a.name) !== null && _c !== void 0 ? _c : 'loadFont';
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return null;
|
|
190
|
-
};
|
|
191
|
-
const getInsertIndexAfterImportsOrDirectives = (ast) => {
|
|
192
|
-
const lastImportIndex = ast.program.body.reduce((lastIndex, statement, index) => {
|
|
193
|
-
return statement.type === 'ImportDeclaration' ? index : lastIndex;
|
|
194
|
-
}, -1);
|
|
195
|
-
if (lastImportIndex !== -1) {
|
|
196
|
-
return lastImportIndex + 1;
|
|
197
|
-
}
|
|
198
|
-
return ast.program.body.findIndex((statement) => {
|
|
199
|
-
return !(statement.type === 'ExpressionStatement' &&
|
|
200
|
-
'directive' in statement &&
|
|
201
|
-
statement.directive);
|
|
202
|
-
});
|
|
203
|
-
};
|
|
204
|
-
const insertAfterImportsOrDirectives = (ast, statement) => {
|
|
205
|
-
const insertIndex = getInsertIndexAfterImportsOrDirectives(ast);
|
|
206
|
-
ast.program.body.splice(insertIndex === -1 ? ast.program.body.length : insertIndex, 0, statement);
|
|
207
|
-
};
|
|
208
|
-
const ensureLoadFontImport = ({ ast, font, usedNames, }) => {
|
|
209
|
-
var _a;
|
|
210
|
-
var _b;
|
|
211
|
-
const existing = getImportedLoadFontIdentifier({ ast, font });
|
|
212
|
-
if (existing) {
|
|
213
|
-
return existing;
|
|
214
|
-
}
|
|
215
|
-
const moduleName = `@remotion/google-fonts/${font.importName}`;
|
|
216
|
-
const localName = getSafeLoadFontIdentifier({ font, usedNames });
|
|
217
|
-
const specifier = b.importSpecifier(b.identifier('loadFont'), b.identifier(localName));
|
|
218
|
-
for (const statement of ast.program.body) {
|
|
219
|
-
if (statement.type === 'ImportDeclaration' &&
|
|
220
|
-
statement.source.value === moduleName &&
|
|
221
|
-
!((_a = statement.specifiers) === null || _a === void 0 ? void 0 : _a.some((existingSpecifier) => existingSpecifier.type === 'ImportNamespaceSpecifier'))) {
|
|
222
|
-
statement.specifiers = [
|
|
223
|
-
...((_b = statement.specifiers) !== null && _b !== void 0 ? _b : []),
|
|
224
|
-
specifier,
|
|
225
|
-
];
|
|
226
|
-
return localName;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
const declaration = b.importDeclaration([specifier], b.stringLiteral(moduleName));
|
|
230
|
-
insertAfterImportsOrDirectives(ast, declaration);
|
|
231
|
-
return localName;
|
|
232
|
-
};
|
|
233
|
-
const getStringArrayObjectProperty = ({ node, key, }) => {
|
|
234
|
-
if (node.type !== 'ObjectExpression') {
|
|
235
|
-
return null;
|
|
236
|
-
}
|
|
237
|
-
const property = node.properties.find((prop) => {
|
|
238
|
-
return (prop.type === 'ObjectProperty' &&
|
|
239
|
-
prop.key.type === 'Identifier' &&
|
|
240
|
-
prop.key.name === key);
|
|
241
|
-
});
|
|
242
|
-
if (!property || property.type !== 'ObjectProperty') {
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
if (property.value.type !== 'ArrayExpression') {
|
|
246
|
-
return null;
|
|
247
|
-
}
|
|
248
|
-
const values = [];
|
|
249
|
-
for (const element of property.value.elements) {
|
|
250
|
-
if (!element || element.type !== 'StringLiteral') {
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
values.push(element.value);
|
|
254
|
-
}
|
|
255
|
-
return values;
|
|
256
|
-
};
|
|
257
|
-
const arraysEqual = (a, bValues) => {
|
|
258
|
-
return (a.length === bValues.length &&
|
|
259
|
-
a.every((value, index) => value === bValues[index]));
|
|
260
|
-
};
|
|
261
|
-
const isMatchingLoadFontCall = ({ statement, localName, font, }) => {
|
|
262
|
-
if (statement.type !== 'ExpressionStatement' ||
|
|
263
|
-
statement.expression.type !== 'CallExpression' ||
|
|
264
|
-
statement.expression.callee.type !== 'Identifier' ||
|
|
265
|
-
statement.expression.callee.name !== localName) {
|
|
266
|
-
return false;
|
|
267
|
-
}
|
|
268
|
-
const [style, options] = statement.expression.arguments;
|
|
269
|
-
if ((style === null || style === void 0 ? void 0 : style.type) !== 'StringLiteral' || style.value !== font.style) {
|
|
270
|
-
return false;
|
|
271
|
-
}
|
|
272
|
-
if (!options || options.type !== 'ObjectExpression') {
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
const weights = getStringArrayObjectProperty({ node: options, key: 'weights' });
|
|
276
|
-
const subsets = getStringArrayObjectProperty({ node: options, key: 'subsets' });
|
|
277
|
-
return (weights !== null &&
|
|
278
|
-
subsets !== null &&
|
|
279
|
-
arraysEqual(weights, font.weights) &&
|
|
280
|
-
arraysEqual(subsets, font.subsets));
|
|
281
|
-
};
|
|
282
|
-
const hasTopLevelLoadFontCall = ({ ast, localName, font, }) => {
|
|
283
|
-
return ast.program.body.some((statement) => {
|
|
284
|
-
return isMatchingLoadFontCall({ statement, localName, font });
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
const getGoogleFontImportName = (moduleName) => {
|
|
288
|
-
const prefix = '@remotion/google-fonts/';
|
|
289
|
-
return moduleName.startsWith(prefix) ? moduleName.slice(prefix.length) : null;
|
|
290
|
-
};
|
|
291
|
-
const normalizeFontFamilyName = (fontFamily) => {
|
|
292
|
-
return fontFamily.toLowerCase().replace(/[^a-z0-9]/g, '');
|
|
293
|
-
};
|
|
294
|
-
const getPrimaryFontFamilyName = (fontFamily) => {
|
|
295
|
-
const trimmed = fontFamily.trim();
|
|
296
|
-
if (!trimmed) {
|
|
297
|
-
return null;
|
|
298
|
-
}
|
|
299
|
-
const quote = trimmed[0];
|
|
300
|
-
if (quote === '"' || quote === "'") {
|
|
301
|
-
const closingQuote = trimmed.indexOf(quote, 1);
|
|
302
|
-
return closingQuote === -1
|
|
303
|
-
? trimmed.slice(1)
|
|
304
|
-
: trimmed.slice(1, closingQuote);
|
|
305
|
-
}
|
|
306
|
-
return trimmed.split(',')[0].trim();
|
|
307
|
-
};
|
|
308
|
-
const collectUsedFontFamilyNames = (ast) => {
|
|
309
|
-
const used = new Set();
|
|
310
|
-
const add = (fontFamily) => {
|
|
311
|
-
const primary = getPrimaryFontFamilyName(fontFamily);
|
|
312
|
-
if (primary) {
|
|
313
|
-
used.add(normalizeFontFamilyName(primary));
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
recast.types.visit(ast, {
|
|
317
|
-
visitObjectProperty(path) {
|
|
318
|
-
var _a;
|
|
319
|
-
const { node } = path;
|
|
320
|
-
if (node.key.type === 'Identifier' && node.key.name === 'fontFamily') {
|
|
321
|
-
if (node.value.type === 'StringLiteral') {
|
|
322
|
-
add(node.value.value);
|
|
323
|
-
}
|
|
324
|
-
if (node.value.type === 'TemplateLiteral' &&
|
|
325
|
-
node.value.expressions.length === 0 &&
|
|
326
|
-
node.value.quasis.length === 1) {
|
|
327
|
-
add((_a = node.value.quasis[0].value.cooked) !== null && _a !== void 0 ? _a : node.value.quasis[0].value.raw);
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
this.traverse(path);
|
|
331
|
-
},
|
|
332
|
-
visitJSXAttribute(path) {
|
|
333
|
-
var _a;
|
|
334
|
-
const { node } = path;
|
|
335
|
-
if (node.name.type === 'JSXIdentifier' &&
|
|
336
|
-
node.name.name === 'fontFamily' &&
|
|
337
|
-
((_a = node.value) === null || _a === void 0 ? void 0 : _a.type) === 'StringLiteral') {
|
|
338
|
-
add(node.value.value);
|
|
339
|
-
}
|
|
340
|
-
this.traverse(path);
|
|
341
|
-
},
|
|
342
|
-
});
|
|
343
|
-
return used;
|
|
344
|
-
};
|
|
345
|
-
const isIdentifierImportedBySpecifier = ({ parent, name, }) => {
|
|
346
|
-
return (parent !== null &&
|
|
347
|
-
typeof parent === 'object' &&
|
|
348
|
-
'type' in parent &&
|
|
349
|
-
parent.type === 'ImportSpecifier' &&
|
|
350
|
-
'local' in parent &&
|
|
351
|
-
parent.local !== null &&
|
|
352
|
-
typeof parent.local === 'object' &&
|
|
353
|
-
'type' in parent.local &&
|
|
354
|
-
parent.local.type === 'Identifier' &&
|
|
355
|
-
'name' in parent.local &&
|
|
356
|
-
parent.local.name === name);
|
|
357
|
-
};
|
|
358
|
-
const hasNonImportIdentifierReference = ({ ast, name, }) => {
|
|
359
|
-
let hasReference = false;
|
|
360
|
-
recast.types.visit(ast, {
|
|
361
|
-
visitIdentifier(path) {
|
|
362
|
-
if (path.node.name !== name) {
|
|
363
|
-
this.traverse(path);
|
|
364
|
-
return;
|
|
365
|
-
}
|
|
366
|
-
if (isIdentifierImportedBySpecifier({ parent: path.parent.node, name })) {
|
|
367
|
-
this.traverse(path);
|
|
368
|
-
return;
|
|
369
|
-
}
|
|
370
|
-
hasReference = true;
|
|
371
|
-
return false;
|
|
372
|
-
},
|
|
373
|
-
});
|
|
374
|
-
return hasReference;
|
|
375
|
-
};
|
|
376
|
-
const googleFontLoadingComment = 'Remotion Studio generated Google Font loading';
|
|
377
|
-
const hasStudioGeneratedGoogleFontLoadingComment = (statement) => {
|
|
378
|
-
var _a;
|
|
379
|
-
return ((_a = statement.leadingComments) !== null && _a !== void 0 ? _a : []).some((comment) => comment.value.includes(googleFontLoadingComment));
|
|
380
|
-
};
|
|
381
|
-
const isTopLevelCallToIdentifier = ({ statement, localName, }) => {
|
|
382
|
-
return (statement.type === 'ExpressionStatement' &&
|
|
383
|
-
statement.expression.type === 'CallExpression' &&
|
|
384
|
-
statement.expression.callee.type === 'Identifier' &&
|
|
385
|
-
statement.expression.callee.name === localName);
|
|
386
|
-
};
|
|
387
|
-
const removeUnusedGoogleFontSourceEdits = (ast) => {
|
|
388
|
-
var _a;
|
|
389
|
-
var _b, _c;
|
|
390
|
-
const usedFonts = collectUsedFontFamilyNames(ast);
|
|
391
|
-
const loadFontLocalNamesToRemove = new Set();
|
|
392
|
-
for (const statement of ast.program.body) {
|
|
393
|
-
if (statement.type !== 'ImportDeclaration' ||
|
|
394
|
-
typeof statement.source.value !== 'string') {
|
|
395
|
-
continue;
|
|
396
|
-
}
|
|
397
|
-
const importName = getGoogleFontImportName(statement.source.value);
|
|
398
|
-
if (!importName) {
|
|
399
|
-
continue;
|
|
400
|
-
}
|
|
401
|
-
if (usedFonts.has(normalizeFontFamilyName(importName))) {
|
|
402
|
-
continue;
|
|
403
|
-
}
|
|
404
|
-
for (const specifier of (_b = statement.specifiers) !== null && _b !== void 0 ? _b : []) {
|
|
405
|
-
if (specifier.type === 'ImportSpecifier' &&
|
|
406
|
-
specifier.imported.type === 'Identifier' &&
|
|
407
|
-
specifier.imported.name === 'loadFont') {
|
|
408
|
-
loadFontLocalNamesToRemove.add((_c = (_a = specifier.local) === null || _a === void 0 ? void 0 : _a.name) !== null && _c !== void 0 ? _c : 'loadFont');
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
if (loadFontLocalNamesToRemove.size === 0) {
|
|
413
|
-
return;
|
|
414
|
-
}
|
|
415
|
-
ast.program.body = ast.program.body.filter((statement) => {
|
|
416
|
-
for (const localName of loadFontLocalNamesToRemove) {
|
|
417
|
-
if (isTopLevelCallToIdentifier({ statement, localName }) &&
|
|
418
|
-
hasStudioGeneratedGoogleFontLoadingComment(statement)) {
|
|
419
|
-
return false;
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
return true;
|
|
423
|
-
});
|
|
424
|
-
ast.program.body = ast.program.body.filter((statement) => {
|
|
425
|
-
var _a;
|
|
426
|
-
if (statement.type !== 'ImportDeclaration') {
|
|
427
|
-
return true;
|
|
428
|
-
}
|
|
429
|
-
statement.specifiers = ((_a = statement.specifiers) !== null && _a !== void 0 ? _a : []).filter((specifier) => {
|
|
430
|
-
var _a, _b;
|
|
431
|
-
var _c, _d;
|
|
432
|
-
return !(specifier.type === 'ImportSpecifier' &&
|
|
433
|
-
specifier.imported.type === 'Identifier' &&
|
|
434
|
-
specifier.imported.name === 'loadFont' &&
|
|
435
|
-
loadFontLocalNamesToRemove.has((_c = (_a = specifier.local) === null || _a === void 0 ? void 0 : _a.name) !== null && _c !== void 0 ? _c : 'loadFont') &&
|
|
436
|
-
!hasNonImportIdentifierReference({
|
|
437
|
-
ast,
|
|
438
|
-
name: (_d = (_b = specifier.local) === null || _b === void 0 ? void 0 : _b.name) !== null && _d !== void 0 ? _d : 'loadFont',
|
|
439
|
-
}));
|
|
440
|
-
});
|
|
441
|
-
return statement.specifiers.length > 0;
|
|
442
|
-
});
|
|
443
|
-
};
|
|
444
|
-
const insertLoadFontCall = ({ ast, font, localName, }) => {
|
|
445
|
-
if (hasTopLevelLoadFontCall({ ast, localName, font })) {
|
|
446
|
-
return;
|
|
447
|
-
}
|
|
448
|
-
const call = b.expressionStatement(b.callExpression(b.identifier(localName), [
|
|
449
|
-
b.stringLiteral(font.style),
|
|
450
|
-
b.objectExpression([
|
|
451
|
-
b.objectProperty(b.identifier('weights'), b.arrayExpression(font.weights.map((weight) => b.stringLiteral(weight)))),
|
|
452
|
-
b.objectProperty(b.identifier('subsets'), b.arrayExpression(font.subsets.map((subset) => b.stringLiteral(subset)))),
|
|
453
|
-
]),
|
|
454
|
-
]));
|
|
455
|
-
call.comments = [b.commentLine(` ${googleFontLoadingComment}`)];
|
|
456
|
-
insertAfterImportsOrDirectives(ast, call);
|
|
457
|
-
};
|
|
458
|
-
const applyGoogleFontSourceEdits = ({ ast, updates, }) => {
|
|
459
|
-
const fonts = new Map();
|
|
460
|
-
let hasFontFamilyUpdate = false;
|
|
461
|
-
for (const update of updates) {
|
|
462
|
-
if (update.key === 'style.fontFamily') {
|
|
463
|
-
hasFontFamilyUpdate = true;
|
|
464
|
-
}
|
|
465
|
-
if (update.googleFont) {
|
|
466
|
-
fonts.set(update.googleFont.importName, update.googleFont);
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const usedNames = collectTopLevelIdentifierNames(ast);
|
|
470
|
-
for (const font of fonts.values()) {
|
|
471
|
-
const localName = ensureLoadFontImport({ ast, font, usedNames });
|
|
472
|
-
insertLoadFontCall({ ast, font, localName });
|
|
473
|
-
}
|
|
474
|
-
if (hasFontFamilyUpdate) {
|
|
475
|
-
removeUnusedGoogleFontSourceEdits(ast);
|
|
476
|
-
}
|
|
477
|
-
};
|
|
478
|
-
const migrateCssShorthand = ({ node, cssShorthand, }) => {
|
|
479
|
-
var _a, _b, _c;
|
|
480
|
-
var _d;
|
|
481
|
-
const styleAttribute = (_a = node.attributes) === null || _a === void 0 ? void 0 : _a.find((attribute) => attribute.type === 'JSXAttribute' &&
|
|
482
|
-
attribute.name.type === 'JSXIdentifier' &&
|
|
483
|
-
attribute.name.name === 'style');
|
|
484
|
-
if ((styleAttribute === null || styleAttribute === void 0 ? void 0 : styleAttribute.type) !== 'JSXAttribute' ||
|
|
485
|
-
((_b = styleAttribute.value) === null || _b === void 0 ? void 0 : _b.type) !== 'JSXExpressionContainer' ||
|
|
486
|
-
styleAttribute.value.expression.type !== 'ObjectExpression') {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
489
|
-
const { properties } = styleAttribute.value.expression;
|
|
490
|
-
for (let index = 0; index < properties.length; index++) {
|
|
491
|
-
const property = properties[index];
|
|
492
|
-
if (property.type !== 'ObjectProperty' ||
|
|
493
|
-
!((property.key.type === 'Identifier' &&
|
|
494
|
-
property.key.name === cssShorthand.shorthand) ||
|
|
495
|
-
(property.key.type === 'StringLiteral' &&
|
|
496
|
-
property.key.value === cssShorthand.shorthand))) {
|
|
497
|
-
continue;
|
|
498
|
-
}
|
|
499
|
-
const shorthandValue = property.value.type === 'StringLiteral'
|
|
500
|
-
? property.value.value
|
|
501
|
-
: property.value.type === 'NumericLiteral'
|
|
502
|
-
? property.value.value
|
|
503
|
-
: property.value.type === 'TemplateLiteral' &&
|
|
504
|
-
property.value.expressions.length === 0
|
|
505
|
-
? ((_d = (_c = property.value.quasis[0]) === null || _c === void 0 ? void 0 : _c.value.cooked) !== null && _d !== void 0 ? _d : null)
|
|
506
|
-
: null;
|
|
507
|
-
if (shorthandValue === null) {
|
|
508
|
-
continue;
|
|
509
|
-
}
|
|
510
|
-
const parsed = cssShorthand.parse(shorthandValue);
|
|
511
|
-
if (!parsed) {
|
|
512
|
-
continue;
|
|
513
|
-
}
|
|
514
|
-
properties.splice(index, 1, ...cssShorthand.longhands.map((longhand) => {
|
|
515
|
-
const value = parsed[longhand];
|
|
516
|
-
return b.objectProperty(b.identifier(longhand), typeof value === 'number'
|
|
517
|
-
? b.numericLiteral(value)
|
|
518
|
-
: b.stringLiteral(value));
|
|
519
|
-
}));
|
|
520
|
-
index += cssShorthand.longhands.length - 1;
|
|
521
|
-
}
|
|
522
|
-
};
|
|
523
|
-
const updateSequencePropsNode = ({ jsxElement, updates, schema, videoConfigValues, }) => {
|
|
524
|
-
var _a, _b, _c, _d;
|
|
525
|
-
var _e, _f;
|
|
526
|
-
const node = jsxElement.openingElement;
|
|
527
|
-
const logLine = (_e = (_a = node.loc) === null || _a === void 0 ? void 0 : _a.start.line) !== null && _e !== void 0 ? _e : 1;
|
|
528
|
-
for (const cssShorthand of (0, css_shorthand_properties_1.getCssShorthandsForUpdates)(updates.map((update) => update.key))) {
|
|
529
|
-
migrateCssShorthand({ node, cssShorthand });
|
|
530
|
-
}
|
|
531
|
-
const oldValueStrings = [];
|
|
532
|
-
const initialAttrs = snapshotTopLevelAttrs(node);
|
|
533
|
-
const updatedTopLevelKeys = new Set(updates.map(({ key }) => {
|
|
534
|
-
const dot = key.indexOf('.');
|
|
535
|
-
return dot === -1 ? key : key.slice(0, dot);
|
|
536
|
-
}));
|
|
537
|
-
const createValueExpression = ({ existing, value, }) => {
|
|
538
|
-
if (existing === null || typeof value !== 'number') {
|
|
539
|
-
return (0, update_nested_prop_1.parseValueExpression)(value);
|
|
540
|
-
}
|
|
541
|
-
const expression = (0, video_config_numeric_expression_1.parseVideoConfigNumericExpression)({
|
|
542
|
-
node: existing,
|
|
543
|
-
videoConfigValues,
|
|
544
|
-
});
|
|
545
|
-
if (expression === null) {
|
|
546
|
-
return (0, update_nested_prop_1.parseValueExpression)(value);
|
|
547
|
-
}
|
|
548
|
-
return expression.value === value
|
|
549
|
-
? existing
|
|
550
|
-
: (0, video_config_numeric_expression_1.updateVideoConfigNumericExpression)({ expression, value });
|
|
551
|
-
};
|
|
552
|
-
for (const { key, value, defaultValue } of updates) {
|
|
553
|
-
let oldValueString = '';
|
|
554
|
-
if (key === 'children') {
|
|
555
|
-
oldValueString = updateJsxTextContent({ jsxElement, value });
|
|
556
|
-
oldValueStrings.push(oldValueString);
|
|
557
|
-
continue;
|
|
558
|
-
}
|
|
559
|
-
const isDefault = (defaultValue === null && value === undefined) ||
|
|
560
|
-
(defaultValue !== null &&
|
|
561
|
-
JSON.stringify(value) === JSON.stringify(defaultValue));
|
|
562
|
-
const dotIndex = key.indexOf('.');
|
|
563
|
-
const isNested = dotIndex !== -1;
|
|
564
|
-
const parentKey = isNested ? key.slice(0, dotIndex) : key;
|
|
565
|
-
const childKey = isNested ? key.slice(dotIndex + 1) : '';
|
|
566
|
-
if (isNested) {
|
|
567
|
-
oldValueString = (0, update_nested_prop_1.updateNestedProp)({
|
|
568
|
-
node,
|
|
569
|
-
parentKey,
|
|
570
|
-
childKey,
|
|
571
|
-
value,
|
|
572
|
-
defaultValue,
|
|
573
|
-
isDefault,
|
|
574
|
-
createValueExpression: (existing) => createValueExpression({ existing, value }),
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
else {
|
|
578
|
-
const attrIndex = (_b = node.attributes) === null || _b === void 0 ? void 0 : _b.findIndex((a) => {
|
|
579
|
-
if (a.type === 'JSXSpreadAttribute') {
|
|
580
|
-
return false;
|
|
581
|
-
}
|
|
582
|
-
if (a.name.type === 'JSXNamespacedName') {
|
|
583
|
-
return false;
|
|
584
|
-
}
|
|
585
|
-
return a.name.name === key;
|
|
586
|
-
});
|
|
587
|
-
const attr = attrIndex !== undefined && attrIndex !== -1
|
|
588
|
-
? (_c = node.attributes) === null || _c === void 0 ? void 0 : _c[attrIndex]
|
|
589
|
-
: undefined;
|
|
590
|
-
if (attr && attr.type !== 'JSXSpreadAttribute' && attr.value) {
|
|
591
|
-
const printed = recast.print(attr.value).code;
|
|
592
|
-
// Strip JSX expression container braces, e.g. "{30}" -> "30"
|
|
593
|
-
oldValueString =
|
|
594
|
-
printed.startsWith('{') && printed.endsWith('}')
|
|
595
|
-
? printed.slice(1, -1)
|
|
596
|
-
: printed;
|
|
597
|
-
}
|
|
598
|
-
else if (attr && attr.type !== 'JSXSpreadAttribute' && !attr.value) {
|
|
599
|
-
// JSX shorthand like `loop` (no value) is implicitly `true`
|
|
600
|
-
oldValueString = 'true';
|
|
601
|
-
}
|
|
602
|
-
else if (!attr && defaultValue !== null) {
|
|
603
|
-
oldValueString = JSON.stringify(defaultValue);
|
|
604
|
-
}
|
|
605
|
-
if (isDefault) {
|
|
606
|
-
if (attr && attr.type !== 'JSXSpreadAttribute' && node.attributes) {
|
|
607
|
-
node.attributes.splice(attrIndex, 1);
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
else {
|
|
611
|
-
const existingExpression = (attr === null || attr === void 0 ? void 0 : attr.type) === 'JSXAttribute' &&
|
|
612
|
-
((_d = attr.value) === null || _d === void 0 ? void 0 : _d.type) === 'JSXExpressionContainer' &&
|
|
613
|
-
attr.value.expression.type !== 'JSXEmptyExpression'
|
|
614
|
-
? attr.value.expression
|
|
615
|
-
: null;
|
|
616
|
-
const parsed = createValueExpression({
|
|
617
|
-
existing: existingExpression,
|
|
618
|
-
value,
|
|
619
|
-
});
|
|
620
|
-
const newValue = value === true ? null : b.jsxExpressionContainer(parsed);
|
|
621
|
-
if (!attr || attr.type === 'JSXSpreadAttribute') {
|
|
622
|
-
const newAttr = b.jsxAttribute(b.jsxIdentifier(key), newValue);
|
|
623
|
-
if (!node.attributes) {
|
|
624
|
-
node.attributes = [];
|
|
625
|
-
}
|
|
626
|
-
node.attributes.push(newAttr);
|
|
627
|
-
}
|
|
628
|
-
else {
|
|
629
|
-
attr.value = newValue;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
oldValueStrings.push(oldValueString);
|
|
634
|
-
if (!isNested) {
|
|
635
|
-
const fieldSchema = schema[key];
|
|
636
|
-
if (fieldSchema && fieldSchema.type === 'enum') {
|
|
637
|
-
const propsToDelete = no_react_1.NoReactInternals.findPropsToDelete({
|
|
638
|
-
schema,
|
|
639
|
-
key,
|
|
640
|
-
value,
|
|
641
|
-
});
|
|
642
|
-
for (const propToDelete of propsToDelete) {
|
|
643
|
-
removeVariantKey({ node, variantKey: propToDelete });
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
const finalAttrNames = new Set();
|
|
649
|
-
for (const a of (_f = node.attributes) !== null && _f !== void 0 ? _f : []) {
|
|
650
|
-
if (a.type === 'JSXAttribute' && a.name.type === 'JSXIdentifier') {
|
|
651
|
-
finalAttrNames.add(a.name.name);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
const removedProps = [];
|
|
655
|
-
for (const [name, valueString] of initialAttrs) {
|
|
656
|
-
if (finalAttrNames.has(name) || updatedTopLevelKeys.has(name)) {
|
|
657
|
-
continue;
|
|
658
|
-
}
|
|
659
|
-
removedProps.push({ key: name, valueString });
|
|
660
|
-
}
|
|
661
|
-
return {
|
|
662
|
-
oldValueStrings,
|
|
663
|
-
logLine,
|
|
664
|
-
removedProps,
|
|
665
|
-
};
|
|
666
|
-
};
|
|
667
|
-
const updateSequencePropsAst = ({ input, nodePath, updates, schema, videoConfigValues, }) => {
|
|
668
|
-
const ast = (0, parse_ast_1.parseAst)(input);
|
|
669
|
-
const videoConfigIdentifierValues = (0, video_config_values_1.getVideoConfigIdentifierValues)({
|
|
670
|
-
ast,
|
|
671
|
-
videoConfigValues,
|
|
672
|
-
});
|
|
673
|
-
const jsxElement = (0, can_update_sequence_props_1.findJsxElementNodeAtNodePath)(ast, nodePath);
|
|
674
|
-
if (!jsxElement) {
|
|
675
|
-
throw new Error('Could not find a JSX element at the specified line to update');
|
|
676
|
-
}
|
|
677
|
-
const { oldValueStrings, logLine, removedProps } = updateSequencePropsNode({
|
|
678
|
-
jsxElement,
|
|
679
|
-
updates,
|
|
680
|
-
schema,
|
|
681
|
-
videoConfigValues: videoConfigIdentifierValues,
|
|
682
|
-
});
|
|
683
|
-
applyGoogleFontSourceEdits({ ast, updates });
|
|
684
|
-
return {
|
|
685
|
-
serialized: (0, parse_ast_1.serializeAst)(ast),
|
|
686
|
-
oldValueStrings,
|
|
687
|
-
logLine,
|
|
688
|
-
removedProps,
|
|
689
|
-
};
|
|
690
|
-
};
|
|
691
|
-
exports.updateSequencePropsAst = updateSequencePropsAst;
|
|
692
7
|
const updateMultipleSequenceProps = async ({ input, changes, prettierConfigOverride, }) => {
|
|
693
|
-
const
|
|
694
|
-
const allUpdates = [];
|
|
695
|
-
const results = changes.map(({ nodePath, updates, schema, videoConfigValues }) => {
|
|
696
|
-
const jsxElement = (0, can_update_sequence_props_1.findJsxElementNodeAtNodePath)(ast, nodePath);
|
|
697
|
-
if (!jsxElement) {
|
|
698
|
-
throw new Error('Could not find a JSX element at the specified line to update');
|
|
699
|
-
}
|
|
700
|
-
allUpdates.push(...updates);
|
|
701
|
-
return updateSequencePropsNode({
|
|
702
|
-
jsxElement,
|
|
703
|
-
updates,
|
|
704
|
-
schema,
|
|
705
|
-
videoConfigValues: (0, video_config_values_1.getVideoConfigIdentifierValues)({
|
|
706
|
-
ast,
|
|
707
|
-
videoConfigValues,
|
|
708
|
-
}),
|
|
709
|
-
});
|
|
710
|
-
});
|
|
711
|
-
applyGoogleFontSourceEdits({ ast, updates: allUpdates });
|
|
8
|
+
const { output: unformattedOutput, results } = (0, studio_codemods_1.updateMultipleSequenceProps)({ input, changes });
|
|
712
9
|
const { output, formatted } = await (0, format_file_content_1.formatFileContent)({
|
|
713
|
-
input:
|
|
10
|
+
input: unformattedOutput,
|
|
714
11
|
prettierConfigOverride,
|
|
715
12
|
});
|
|
716
|
-
return {
|
|
717
|
-
output,
|
|
718
|
-
formatted,
|
|
719
|
-
results,
|
|
720
|
-
};
|
|
13
|
+
return { output, formatted, results };
|
|
721
14
|
};
|
|
722
15
|
exports.updateMultipleSequenceProps = updateMultipleSequenceProps;
|
|
723
16
|
const updateSequenceProps = async ({ input, nodePath, updates, schema, prettierConfigOverride, videoConfigValues, }) => {
|
|
724
|
-
const { serialized, oldValueStrings, logLine, removedProps } = (0,
|
|
17
|
+
const { serialized, oldValueStrings, logLine, removedProps } = (0, studio_codemods_1.updateSequencePropsAst)({
|
|
725
18
|
input,
|
|
726
19
|
nodePath,
|
|
727
20
|
updates,
|
|
@@ -732,12 +25,6 @@ const updateSequenceProps = async ({ input, nodePath, updates, schema, prettierC
|
|
|
732
25
|
input: serialized,
|
|
733
26
|
prettierConfigOverride,
|
|
734
27
|
});
|
|
735
|
-
return {
|
|
736
|
-
output,
|
|
737
|
-
oldValueStrings,
|
|
738
|
-
formatted,
|
|
739
|
-
logLine,
|
|
740
|
-
removedProps,
|
|
741
|
-
};
|
|
28
|
+
return { output, oldValueStrings, formatted, logLine, removedProps };
|
|
742
29
|
};
|
|
743
30
|
exports.updateSequenceProps = updateSequenceProps;
|