@teambit/schema 1.0.926 → 1.0.928
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mock/button-diff.json +139 -0
- package/dist/mock/button-v2/button.composition.d.ts +10 -0
- package/dist/mock/button-v2/button.composition.js +59 -0
- package/dist/mock/button-v2/button.composition.js.map +1 -0
- package/dist/mock/button-v2/button.d.ts +25 -0
- package/dist/mock/button-v2/button.js +55 -0
- package/dist/mock/button-v2/button.js.map +1 -0
- package/dist/mock/button-v2/index.d.ts +127 -0
- package/dist/mock/button-v2/index.js +238 -0
- package/dist/mock/button-v2/index.js.map +1 -0
- package/dist/mock/button-v2/tsconfig.json +19 -0
- package/dist/preview-1775143204644.js +9 -0
- package/dist/schema-diff.cmd.d.ts +30 -0
- package/dist/schema-diff.cmd.js +252 -0
- package/dist/schema-diff.cmd.js.map +1 -0
- package/dist/schema.cmd.d.ts +1 -0
- package/dist/schema.cmd.js +1 -0
- package/dist/schema.cmd.js.map +1 -1
- package/dist/schema.graphql.js +47 -0
- package/dist/schema.graphql.js.map +1 -1
- package/dist/schema.main.runtime.d.ts +29 -3
- package/dist/schema.main.runtime.js +60 -5
- package/dist/schema.main.runtime.js.map +1 -1
- package/dist/schema.spec.js +108 -0
- package/dist/schema.spec.js.map +1 -1
- package/mock/button-diff.json +139 -0
- package/mock/button-v2/button.composition.tsx +33 -0
- package/mock/button-v2/button.tsx +58 -0
- package/mock/button-v2/index.ts +214 -0
- package/mock/button-v2/tsconfig.json +19 -0
- package/package.json +17 -15
- package/dist/preview-1774991821432.js +0 -8
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
myFunc: true,
|
|
8
|
+
Hi: true,
|
|
9
|
+
a: true,
|
|
10
|
+
b: true,
|
|
11
|
+
HiThere: true,
|
|
12
|
+
Function: true,
|
|
13
|
+
Array: true,
|
|
14
|
+
ClassSomething: true,
|
|
15
|
+
a1: true,
|
|
16
|
+
getBar: true,
|
|
17
|
+
tuple: true,
|
|
18
|
+
Food: true,
|
|
19
|
+
getPromise: true,
|
|
20
|
+
typePredicateFn: true,
|
|
21
|
+
typePredicateNoTypeFn: true,
|
|
22
|
+
objectBindingElements: true,
|
|
23
|
+
arrayBindingElements: true,
|
|
24
|
+
genericFunction: true,
|
|
25
|
+
gfnc2: true,
|
|
26
|
+
LogMethod: true,
|
|
27
|
+
CustomClassDecorator: true,
|
|
28
|
+
ExampleDecoratorOne: true,
|
|
29
|
+
ValidateArgs: true,
|
|
30
|
+
ExampleDecoratorTwo: true,
|
|
31
|
+
newUtility: true,
|
|
32
|
+
Compositions: true
|
|
33
|
+
};
|
|
34
|
+
exports.Compositions = exports.ClassSomething = exports.Array = void 0;
|
|
35
|
+
exports.CustomClassDecorator = CustomClassDecorator;
|
|
36
|
+
exports.Function = exports.Food = exports.ExampleDecoratorTwo = exports.ExampleDecoratorOne = void 0;
|
|
37
|
+
exports.Hi = Hi;
|
|
38
|
+
exports.HiThere = void 0;
|
|
39
|
+
exports.LogMethod = LogMethod;
|
|
40
|
+
exports.ValidateArgs = ValidateArgs;
|
|
41
|
+
exports.a1 = exports.a = void 0;
|
|
42
|
+
exports.arrayBindingElements = arrayBindingElements;
|
|
43
|
+
exports.b = void 0;
|
|
44
|
+
exports.genericFunction = genericFunction;
|
|
45
|
+
exports.getBar = void 0;
|
|
46
|
+
exports.getPromise = getPromise;
|
|
47
|
+
exports.gfnc2 = void 0;
|
|
48
|
+
exports.myFunc = myFunc;
|
|
49
|
+
exports.newUtility = newUtility;
|
|
50
|
+
exports.objectBindingElements = objectBindingElements;
|
|
51
|
+
exports.tuple = void 0;
|
|
52
|
+
exports.typePredicateFn = typePredicateFn;
|
|
53
|
+
exports.typePredicateNoTypeFn = typePredicateNoTypeFn;
|
|
54
|
+
var _button = require("./button");
|
|
55
|
+
Object.keys(_button).forEach(function (key) {
|
|
56
|
+
if (key === "default" || key === "__esModule") return;
|
|
57
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
58
|
+
if (key in exports && exports[key] === _button[key]) return;
|
|
59
|
+
Object.defineProperty(exports, key, {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function () {
|
|
62
|
+
return _button[key];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
function _Compositions() {
|
|
67
|
+
const data = _interopRequireWildcard(require("./button.composition"));
|
|
68
|
+
_Compositions = function () {
|
|
69
|
+
return data;
|
|
70
|
+
};
|
|
71
|
+
return data;
|
|
72
|
+
}
|
|
73
|
+
Object.defineProperty(exports, "Compositions", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return _Compositions();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var _dec, _dec2, _dec3, _dec4, _class, _class2, _dec5, _dec6, _dec7, _dec8, _class3, _class4;
|
|
80
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
81
|
+
function _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }
|
|
82
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
83
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
84
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
85
|
+
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
86
|
+
/* eslint-disable @typescript-eslint/no-shadow */
|
|
87
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
88
|
+
/* eslint-disable @typescript-eslint/prefer-as-const */
|
|
89
|
+
/* eslint-disable one-var */
|
|
90
|
+
/* eslint-disable max-classes-per-file */
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Updated comment for myFunc
|
|
94
|
+
* @param a { number } this is A
|
|
95
|
+
* @param b this is B
|
|
96
|
+
* @param c this is C
|
|
97
|
+
* @returns { number } results of adding a, b and c
|
|
98
|
+
*/
|
|
99
|
+
function myFunc(a = 4, b = 5, c = 0) {
|
|
100
|
+
return a + b + c;
|
|
101
|
+
}
|
|
102
|
+
function Hi() {}
|
|
103
|
+
const a = exports.a = 4,
|
|
104
|
+
b = exports.b = 5;
|
|
105
|
+
const HiThere = exports.HiThere = 'HiThere';
|
|
106
|
+
const Function = () => {};
|
|
107
|
+
exports.Function = Function;
|
|
108
|
+
const Array = exports.Array = ['hi', 'there'];
|
|
109
|
+
class Foo {}
|
|
110
|
+
class ClassSomething {
|
|
111
|
+
constructor(da) {
|
|
112
|
+
this.da = da;
|
|
113
|
+
_defineProperty(this, "app", '');
|
|
114
|
+
}
|
|
115
|
+
a() {
|
|
116
|
+
return new Foo();
|
|
117
|
+
}
|
|
118
|
+
get getter() {
|
|
119
|
+
return 'hi';
|
|
120
|
+
}
|
|
121
|
+
set setter(a) {}
|
|
122
|
+
newMethod() {
|
|
123
|
+
return 'new';
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
exports.ClassSomething = ClassSomething;
|
|
127
|
+
const obj = {
|
|
128
|
+
a: 1,
|
|
129
|
+
b: 2
|
|
130
|
+
};
|
|
131
|
+
const a1 = exports.a1 = {
|
|
132
|
+
a: 5,
|
|
133
|
+
b: 9
|
|
134
|
+
};
|
|
135
|
+
// this is for Jump in the definition
|
|
136
|
+
class Bar {
|
|
137
|
+
foo() {}
|
|
138
|
+
}
|
|
139
|
+
const getBar = bar => new Bar();
|
|
140
|
+
exports.getBar = getBar;
|
|
141
|
+
const tuple = ([a, b, c]) => {};
|
|
142
|
+
exports.tuple = tuple;
|
|
143
|
+
let Food = exports.Food = /*#__PURE__*/function (Food) {
|
|
144
|
+
Food[Food["Falafel"] = 0] = "Falafel";
|
|
145
|
+
Food[Food["Hummus"] = 1] = "Hummus";
|
|
146
|
+
Food[Food["Tahini"] = 2] = "Tahini";
|
|
147
|
+
Food[Food["Shawarma"] = 3] = "Shawarma";
|
|
148
|
+
return Food;
|
|
149
|
+
}({});
|
|
150
|
+
async function getPromise() {
|
|
151
|
+
return 'promise';
|
|
152
|
+
}
|
|
153
|
+
class T1 {}
|
|
154
|
+
class T2 {}
|
|
155
|
+
class T3 {}
|
|
156
|
+
function typePredicateFn(str) {
|
|
157
|
+
return str;
|
|
158
|
+
}
|
|
159
|
+
function typePredicateNoTypeFn(condition, msg) {}
|
|
160
|
+
async function objectBindingElements({
|
|
161
|
+
prop = 1
|
|
162
|
+
}) {
|
|
163
|
+
return prop;
|
|
164
|
+
}
|
|
165
|
+
async function arrayBindingElements([prop]) {
|
|
166
|
+
return prop;
|
|
167
|
+
}
|
|
168
|
+
const computedName = 'str';
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Conditional Generic Type
|
|
172
|
+
*/
|
|
173
|
+
|
|
174
|
+
function genericFunction(a) {
|
|
175
|
+
return function (a) {};
|
|
176
|
+
}
|
|
177
|
+
const gfnc2 = exports.gfnc2 = genericFunction('');
|
|
178
|
+
function LogMethod(message) {
|
|
179
|
+
return function (target, propertyKey, descriptor) {
|
|
180
|
+
const originalMethod = descriptor.value;
|
|
181
|
+
descriptor.value = function (...args) {
|
|
182
|
+
console.log(`Logging: ${message}`);
|
|
183
|
+
return originalMethod.apply(this, args);
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
function CustomClassDecorator(config) {
|
|
188
|
+
return function (target) {
|
|
189
|
+
console.log(`Class ${config.name} - ${config.description}`);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
let ExampleDecoratorOne = exports.ExampleDecoratorOne = (_dec = CustomClassDecorator({
|
|
193
|
+
name: 'ExampleClass2',
|
|
194
|
+
description: 'This is an example class 2'
|
|
195
|
+
}), _dec2 = LogMethod('This is a log message'), _dec3 = Reflect.metadata("design:type", Function), _dec4 = Reflect.metadata("design:paramtypes", []), _dec(_class = (_class2 = class ExampleDecoratorOne {
|
|
196
|
+
exampleMethod() {
|
|
197
|
+
// Method logic
|
|
198
|
+
}
|
|
199
|
+
}, _applyDecoratedDescriptor(_class2.prototype, "exampleMethod", [_dec2, _dec3, _dec4], Object.getOwnPropertyDescriptor(_class2.prototype, "exampleMethod"), _class2.prototype), _class2)) || _class);
|
|
200
|
+
function ValidateArgs(config) {
|
|
201
|
+
return function (target, propertyKey, descriptor) {
|
|
202
|
+
const originalMethod = descriptor.value;
|
|
203
|
+
descriptor.value = function (...args) {
|
|
204
|
+
if (args[0] && typeof args[0] !== config.type) {
|
|
205
|
+
throw new Error('Invalid argument type');
|
|
206
|
+
}
|
|
207
|
+
if (config.required && !args[0]) {
|
|
208
|
+
throw new Error('Argument is required');
|
|
209
|
+
}
|
|
210
|
+
return originalMethod.apply(this, args);
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
let ExampleDecoratorTwo = exports.ExampleDecoratorTwo = (_dec5 = CustomClassDecorator({
|
|
215
|
+
name: 'ExampleClass',
|
|
216
|
+
description: 'This is an example class',
|
|
217
|
+
fn: () => 'hi',
|
|
218
|
+
class: new ClassSomething('dsa'),
|
|
219
|
+
arr: ['hi', 5, true, false, undefined, () => {}, {
|
|
220
|
+
a: 'hi',
|
|
221
|
+
b: 5
|
|
222
|
+
}, new ClassSomething('dsa')]
|
|
223
|
+
}), _dec6 = ValidateArgs({
|
|
224
|
+
type: 'string',
|
|
225
|
+
required: true
|
|
226
|
+
}), _dec7 = Reflect.metadata("design:type", Function), _dec8 = Reflect.metadata("design:paramtypes", [String]), _dec5(_class3 = (_class4 = class ExampleDecoratorTwo {
|
|
227
|
+
exampleMethod(input) {
|
|
228
|
+
// Method logic
|
|
229
|
+
}
|
|
230
|
+
}, _applyDecoratedDescriptor(_class4.prototype, "exampleMethod", [_dec6, _dec7, _dec8], Object.getOwnPropertyDescriptor(_class4.prototype, "exampleMethod"), _class4.prototype), _class4)) || _class3);
|
|
231
|
+
/**
|
|
232
|
+
* A new utility function added in v2
|
|
233
|
+
*/
|
|
234
|
+
function newUtility(x) {
|
|
235
|
+
return x * 2;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_button","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_Compositions","data","_interopRequireWildcard","_dec","_dec2","_dec3","_dec4","_class","_class2","_dec5","_dec6","_dec7","_dec8","_class3","_class4","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","set","getOwnPropertyDescriptor","_applyDecoratedDescriptor","l","a","configurable","initializer","writable","slice","reverse","reduce","value","_defineProperty","_toPropertyKey","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","myFunc","b","c","Hi","HiThere","Function","Array","Foo","ClassSomething","constructor","da","getter","setter","newMethod","obj","a1","Bar","foo","getBar","bar","tuple","Food","getPromise","T1","T2","T3","typePredicateFn","str","typePredicateNoTypeFn","condition","msg","objectBindingElements","prop","arrayBindingElements","computedName","genericFunction","gfnc2","LogMethod","message","target","propertyKey","descriptor","originalMethod","args","console","log","apply","CustomClassDecorator","config","name","description","ExampleDecoratorOne","Reflect","metadata","exampleMethod","ValidateArgs","type","Error","required","ExampleDecoratorTwo","fn","class","arr","undefined","input","newUtility","x"],"sources":["index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n/* eslint-disable @typescript-eslint/no-shadow */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/prefer-as-const */\n/* eslint-disable one-var */\n/* eslint-disable max-classes-per-file */\n\n/**\n * Updated comment for myFunc\n * @param a { number } this is A\n * @param b this is B\n * @param c this is C\n * @returns { number } results of adding a, b and c\n */\nexport function myFunc(a = 4, b = 5, c = 0): number {\n return a + b + c;\n}\n\nexport * from './button';\n\nexport function Hi() {}\n\nexport const a = 4,\n b: 5 = 5;\n\nexport * as Compositions from './button.composition';\n\nexport const HiThere = 'HiThere';\n\nexport const Function = () => {};\n\nexport const Array = ['hi', 'there'];\n\nclass Foo {}\n\nclass ClassSomething {\n app = '';\n constructor(readonly da: 'dsa') {}\n\n a() {\n return new Foo();\n }\n get getter() {\n return 'hi';\n }\n\n set setter(a: boolean) {}\n\n newMethod(): string {\n return 'new';\n }\n}\n\nexport { ClassSomething };\n\nexport type IndexSig = { [key: string]: boolean };\n\nexport interface Hello {\n propertySig: () => void;\n methodSig(): string;\n newProp?: number;\n}\n\nconst obj = { a: 1, b: 2 };\n\nexport const a1: typeof obj = { a: 5, b: 9 };\n\nexport type TypeOperator = keyof typeof obj;\n\n// this is for Jump in the definition\nclass Bar {\n foo() {}\n}\nexport const getBar = (bar: Bar) => new Bar();\n\nexport const tuple = ([a, b, c]: [string, Function, Record<string, any>]) => {};\n\nexport enum Food {\n Falafel,\n Hummus,\n Tahini,\n Shawarma,\n}\n\nexport async function getPromise(): Promise<string> {\n return 'promise';\n}\n\nclass T1 {}\nclass T2 {}\nclass T3<T, K> {}\nexport type TypeRefWithArgs = T3<T1, T2>;\n\nexport type ParenthesizedType = (T1 | T2)[];\n\nexport function typePredicateFn(str: any): str is string {\n return str;\n}\n\nexport function typePredicateNoTypeFn(condition: any, msg?: string): asserts condition {}\n\nexport async function objectBindingElements({ prop = 1 }) {\n return prop;\n}\nexport async function arrayBindingElements([prop]: [string]) {\n return prop;\n}\n\ninterface config {\n someField: { a: string; b: boolean };\n}\nexport type IndexedAccessType = config['someField'];\n\nconst computedName = 'str';\nexport interface ComputedNameWithType {\n [computedName]: boolean;\n}\nexport interface ComputedNameNoType {\n [computedName];\n}\n\ntype World1 = 'world1-a' | 'world1-b';\ntype World2 = 'world2';\nexport type templateLiteralType = `hello ${World1} hi ${World2}`;\n\nexport interface CallSignatureWithTypeParams {\n <T>(a: string): T;\n}\n\n/**\n * Conditional Generic Type\n */\nexport type If<T, U, Y, N> = T extends U ? Y : N;\n\nexport function genericFunction<T>(a: T) {\n return function <T>(a: T) {};\n}\n\nexport const gfnc2 = genericFunction<string>('');\n\nexport function LogMethod(message: string) {\n return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n const originalMethod = descriptor.value;\n descriptor.value = function (...args: any[]) {\n console.log(`Logging: ${message}`);\n return originalMethod.apply(this, args);\n };\n };\n}\n\nexport function CustomClassDecorator(config: {\n name: string;\n description: string;\n fn?: () => string;\n class?: ClassSomething;\n arr?: [\n string,\n number,\n boolean,\n boolean,\n number | undefined,\n (a: string) => void,\n { a: string; b: number },\n ClassSomething,\n ];\n}) {\n return function (target: any) {\n console.log(`Class ${config.name} - ${config.description}`);\n };\n}\n\n@CustomClassDecorator({ name: 'ExampleClass2', description: 'This is an example class 2' })\nexport class ExampleDecoratorOne {\n @LogMethod('This is a log message')\n exampleMethod() {\n // Method logic\n }\n}\n\nexport function ValidateArgs(config: { type: string; required: boolean }) {\n return function (target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n const originalMethod = descriptor.value;\n descriptor.value = function (...args: any[]) {\n if (args[0] && typeof args[0] !== config.type) {\n throw new Error('Invalid argument type');\n }\n if (config.required && !args[0]) {\n throw new Error('Argument is required');\n }\n return originalMethod.apply(this, args);\n };\n };\n}\n\n@CustomClassDecorator({\n name: 'ExampleClass',\n description: 'This is an example class',\n fn: () => 'hi',\n class: new ClassSomething('dsa'),\n arr: ['hi', 5, true, false, undefined, () => {}, { a: 'hi', b: 5 }, new ClassSomething('dsa')],\n})\nexport class ExampleDecoratorTwo {\n @ValidateArgs({ type: 'string', required: true })\n exampleMethod(input: string) {\n // Method logic\n }\n}\n\n/**\n * A new utility function added in v2\n */\nexport function newUtility(x: number): number {\n return x * 2;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAAA,OAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,OAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,OAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,OAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AAAyB,SAAAS,cAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAA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AI;IAAEiB,CAAC,EAAE;EAAE,CAAC,EAAE,IAAIO,cAAc,CAAC,KAAK,CAAC;AAC/F,CAAC,CAAC,EAAA7C,KAAA,GAEC4F,YAAY,CAAC;EAAEC,IAAI,EAAE,QAAQ;EAAEE,QAAQ,EAAE;AAAK,CAAC,CAAC,EAAA9F,KAAA,GAAAwF,OAAA,CAAAC,QAAA,gBAAAhD,QAAA,GAAAxC,KAAA,GAAAuF,OAAA,CAAAC,QAAA,uBAAAvD,MAAA,IAAApC,KAAA,CAAAI,OAAA,IAAAC,OAAA,GARnD,MAOa4F,mBAAmB,CAAC;EAE/BL,aAAaA,CAACU,KAAa,EAAE;IAC3B;EAAA;AAEJ,CAAC,EAAAlF,yBAAA,CAAAf,OAAA,CAAAtB,SAAA,oBAAAkB,KAAA,EAAAC,KAAA,EAAAC,KAAA,GAAAxB,MAAA,CAAAwC,wBAAA,CAAAd,OAAA,CAAAtB,SAAA,oBAAAsB,OAAA,CAAAtB,SAAA,GAAAsB,OAAA,MAAAD,OAAA;AAED;AACA;AACA;AACO,SAASmG,UAAUA,CAACC,CAAS,EAAU;EAC5C,OAAOA,CAAC,GAAG,CAAC;AACd","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"jsx": "react",
|
|
4
|
+
"experimentalDecorators": true,
|
|
5
|
+
"emitDecoratorMetadata": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"module": "commonjs",
|
|
9
|
+
"target": "es2015",
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"noImplicitAny": false,
|
|
12
|
+
"preserveConstEnums": true,
|
|
13
|
+
"strictPropertyInitialization": false,
|
|
14
|
+
"esModuleInterop": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"sourceMap": true,
|
|
17
|
+
"outDir": "./dist"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.928/dist/schema.composition.js';
|
|
2
|
+
import * as compositions_1 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.928/dist/mock/button/button.composition.js';
|
|
3
|
+
import * as compositions_2 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.928/dist/mock/button-v2/button.composition.js';
|
|
4
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.semantics_schema@1.0.928/dist/schema.docs.mdx';
|
|
5
|
+
|
|
6
|
+
export const compositions = [compositions_0, compositions_1, compositions_2];
|
|
7
|
+
export const overview = [overview_0];
|
|
8
|
+
|
|
9
|
+
export const compositions_metadata = {"compositions":[{"displayName":"Logo","identifier":"Logo"},{"displayName":"Basic button","identifier":"BasicButton"},{"displayName":"Footer","identifier":"Footer"},{"displayName":"Button with custom styles","identifier":"ButtonWithCustomStyles"},{"displayName":"Button with icon","identifier":"ButtonWithIcon"},{"displayName":"Button as a link","identifier":"ButtonAsALink"},{"displayName":"Basic button","identifier":"BasicButton"},{"displayName":"Footer","identifier":"Footer"},{"displayName":"Button with custom styles","identifier":"ButtonWithCustomStyles"},{"displayName":"Button with icon","identifier":"ButtonWithIcon"},{"displayName":"Button as a link","identifier":"ButtonAsALink"}]};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Command, CommandOptions, CLIArgs } from '@teambit/cli';
|
|
2
|
+
import type { ComponentMain } from '@teambit/component';
|
|
3
|
+
import type { Logger } from '@teambit/logger';
|
|
4
|
+
import type { SchemaMain } from './schema.main.runtime';
|
|
5
|
+
export declare class SchemaDiffCommand implements Command {
|
|
6
|
+
private schema;
|
|
7
|
+
private component;
|
|
8
|
+
private logger;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
extendedDescription: string;
|
|
12
|
+
group: string;
|
|
13
|
+
options: CommandOptions;
|
|
14
|
+
constructor(schema: SchemaMain, component: ComponentMain, logger: Logger);
|
|
15
|
+
report(args: CLIArgs): Promise<string>;
|
|
16
|
+
json(args: CLIArgs): Promise<Record<string, any>>;
|
|
17
|
+
private computeDiff;
|
|
18
|
+
private toAgentJson;
|
|
19
|
+
private formatDiffResult;
|
|
20
|
+
private formatSection;
|
|
21
|
+
private sortChanges;
|
|
22
|
+
private formatChange;
|
|
23
|
+
private static IMPACT_STYLES;
|
|
24
|
+
private impactBadge;
|
|
25
|
+
private impactTag;
|
|
26
|
+
private impactDot;
|
|
27
|
+
private static DESCRIPTION_ENHANCERS;
|
|
28
|
+
private enhanceDescription;
|
|
29
|
+
private truncateSig;
|
|
30
|
+
}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SchemaDiffCommand = void 0;
|
|
7
|
+
function _chalk() {
|
|
8
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
9
|
+
_chalk = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _semanticsEntities() {
|
|
15
|
+
const data = require("@teambit/semantics.entities.semantic-schema-diff");
|
|
16
|
+
_semanticsEntities = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
25
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
26
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
|
+
class SchemaDiffCommand {
|
|
28
|
+
constructor(schema, component, logger) {
|
|
29
|
+
this.schema = schema;
|
|
30
|
+
this.component = component;
|
|
31
|
+
this.logger = logger;
|
|
32
|
+
_defineProperty(this, "name", 'diff <component> <base-version> <compare-version>');
|
|
33
|
+
_defineProperty(this, "description", 'show API changes between two versions of a component');
|
|
34
|
+
_defineProperty(this, "extendedDescription", `compares the public API schema between two versions of a component.
|
|
35
|
+
shows added, removed, and modified exports with semantic impact analysis.
|
|
36
|
+
|
|
37
|
+
examples:
|
|
38
|
+
bit schema diff my-component 0.0.1 0.0.2`);
|
|
39
|
+
_defineProperty(this, "group", 'info-analysis');
|
|
40
|
+
_defineProperty(this, "options", [['j', 'json', 'return the API diff in json format']]);
|
|
41
|
+
}
|
|
42
|
+
async report(args) {
|
|
43
|
+
const [pattern, baseVersion, compareVersion] = args;
|
|
44
|
+
const {
|
|
45
|
+
diff,
|
|
46
|
+
componentId
|
|
47
|
+
} = await this.computeDiff(pattern, baseVersion, compareVersion);
|
|
48
|
+
return this.formatDiffResult(diff, `${componentId} (${baseVersion} → ${compareVersion})`);
|
|
49
|
+
}
|
|
50
|
+
async json(args) {
|
|
51
|
+
const [pattern, baseVersion, compareVersion] = args;
|
|
52
|
+
const {
|
|
53
|
+
diff,
|
|
54
|
+
componentId
|
|
55
|
+
} = await this.computeDiff(pattern, baseVersion, compareVersion);
|
|
56
|
+
return this.toAgentJson(diff, componentId, baseVersion, compareVersion);
|
|
57
|
+
}
|
|
58
|
+
async computeDiff(pattern, baseVersion, compareVersion) {
|
|
59
|
+
const host = this.component.getHost();
|
|
60
|
+
const ids = await host.idsByPattern(pattern, true);
|
|
61
|
+
if (ids.length === 0) {
|
|
62
|
+
throw new Error(`no components found matching "${pattern}"`);
|
|
63
|
+
}
|
|
64
|
+
if (ids.length > 1) {
|
|
65
|
+
throw new Error(`pattern "${pattern}" matches ${ids.length} components. please specify a single component.`);
|
|
66
|
+
}
|
|
67
|
+
const componentId = ids[0];
|
|
68
|
+
const baseId = componentId.changeVersion(baseVersion);
|
|
69
|
+
const compareId = componentId.changeVersion(compareVersion);
|
|
70
|
+
const [baseComponent, compareComponent] = await host.getMany([baseId, compareId]);
|
|
71
|
+
if (!baseComponent) throw new Error(`could not load ${baseId.toString()}`);
|
|
72
|
+
if (!compareComponent) throw new Error(`could not load ${compareId.toString()}`);
|
|
73
|
+
this.logger.debug(`computing API diff: ${baseId.toString()} -> ${compareId.toString()}`);
|
|
74
|
+
const [baseSchema, compareSchema] = await Promise.all([this.schema.getSchema(baseComponent), this.schema.getSchema(compareComponent)]);
|
|
75
|
+
const assessor = this.schema.getImpactAssessor();
|
|
76
|
+
const diff = (0, _semanticsEntities().computeAPIDiff)(baseSchema, compareSchema, assessor);
|
|
77
|
+
return {
|
|
78
|
+
diff,
|
|
79
|
+
componentId: componentId.toStringWithoutVersion()
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
toAgentJson(diff, componentId, baseVersion, compareVersion) {
|
|
83
|
+
const serializeChange = change => _objectSpread(_objectSpread(_objectSpread({
|
|
84
|
+
status: change.status,
|
|
85
|
+
impact: change.impact,
|
|
86
|
+
exportName: change.exportName,
|
|
87
|
+
schemaType: change.schemaType
|
|
88
|
+
}, change.baseSignature ? {
|
|
89
|
+
baseSignature: change.baseSignature
|
|
90
|
+
} : {}), change.compareSignature ? {
|
|
91
|
+
compareSignature: change.compareSignature
|
|
92
|
+
} : {}), change.changes && change.changes.length > 0 ? {
|
|
93
|
+
details: change.changes.map(d => _objectSpread(_objectSpread({
|
|
94
|
+
changeKind: d.changeKind,
|
|
95
|
+
description: d.description,
|
|
96
|
+
impact: d.impact,
|
|
97
|
+
context: d.context
|
|
98
|
+
}, d.from !== undefined ? {
|
|
99
|
+
from: d.from
|
|
100
|
+
} : {}), d.to !== undefined ? {
|
|
101
|
+
to: d.to
|
|
102
|
+
} : {}))
|
|
103
|
+
} : {});
|
|
104
|
+
return {
|
|
105
|
+
componentId,
|
|
106
|
+
baseVersion,
|
|
107
|
+
compareVersion,
|
|
108
|
+
hasChanges: diff.hasChanges,
|
|
109
|
+
impact: diff.impact,
|
|
110
|
+
summary: {
|
|
111
|
+
added: diff.added,
|
|
112
|
+
removed: diff.removed,
|
|
113
|
+
modified: diff.modified,
|
|
114
|
+
breaking: diff.breaking,
|
|
115
|
+
nonBreaking: diff.nonBreaking,
|
|
116
|
+
patch: diff.patch
|
|
117
|
+
},
|
|
118
|
+
publicAPI: diff.publicChanges.map(serializeChange),
|
|
119
|
+
internal: diff.internalChanges.map(serializeChange)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
formatDiffResult(diff, pattern) {
|
|
123
|
+
if (!diff.hasChanges) {
|
|
124
|
+
return _chalk().default.green(`\n No API changes detected for ${pattern}\n`);
|
|
125
|
+
}
|
|
126
|
+
const lines = [''];
|
|
127
|
+
lines.push(` ${_chalk().default.bold('API Diff')} for ${_chalk().default.cyan(pattern)} ${this.impactBadge(diff.impact)}`);
|
|
128
|
+
lines.push('');
|
|
129
|
+
const parts = [];
|
|
130
|
+
if (diff.added > 0) parts.push(_chalk().default.green(`${diff.added} added`));
|
|
131
|
+
if (diff.removed > 0) parts.push(_chalk().default.red(`${diff.removed} removed`));
|
|
132
|
+
if (diff.modified > 0) parts.push(_chalk().default.yellow(`${diff.modified} modified`));
|
|
133
|
+
const impactParts = [];
|
|
134
|
+
if (diff.breaking > 0) impactParts.push(_chalk().default.red.bold(`${diff.breaking} breaking`));
|
|
135
|
+
if (diff.nonBreaking > 0) impactParts.push(_chalk().default.green(`${diff.nonBreaking} non-breaking`));
|
|
136
|
+
if (diff.patch > 0) impactParts.push(_chalk().default.dim(`${diff.patch} patch`));
|
|
137
|
+
lines.push(` ${parts.join(_chalk().default.dim(' · '))} ${_chalk().default.dim('|')} ${impactParts.join(_chalk().default.dim(' · '))}`);
|
|
138
|
+
lines.push('');
|
|
139
|
+
this.formatSection(lines, 'Public API', diff.publicChanges);
|
|
140
|
+
this.formatSection(lines, 'Internal (non-exported)', diff.internalChanges);
|
|
141
|
+
return lines.join('\n');
|
|
142
|
+
}
|
|
143
|
+
formatSection(lines, title, changes) {
|
|
144
|
+
if (changes.length === 0) return;
|
|
145
|
+
lines.push(` ${_chalk().default.bold.underline(title)}`);
|
|
146
|
+
lines.push('');
|
|
147
|
+
for (const change of this.sortChanges(changes)) {
|
|
148
|
+
lines.push(...this.formatChange(change));
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
sortChanges(changes) {
|
|
152
|
+
const order = {
|
|
153
|
+
REMOVED: 0,
|
|
154
|
+
MODIFIED: 1,
|
|
155
|
+
ADDED: 2
|
|
156
|
+
};
|
|
157
|
+
const impactOrder = {
|
|
158
|
+
BREAKING: 0,
|
|
159
|
+
NON_BREAKING: 1,
|
|
160
|
+
PATCH: 2
|
|
161
|
+
};
|
|
162
|
+
return [...changes].sort((a, b) => {
|
|
163
|
+
const statusDiff = (order[a.status] ?? 3) - (order[b.status] ?? 3);
|
|
164
|
+
if (statusDiff !== 0) return statusDiff;
|
|
165
|
+
return (impactOrder[a.impact] ?? 3) - (impactOrder[b.impact] ?? 3);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
formatChange(change) {
|
|
169
|
+
const lines = [];
|
|
170
|
+
const indent = ' ';
|
|
171
|
+
const impact = this.impactTag(change.impact);
|
|
172
|
+
const kind = _chalk().default.dim(`(${change.schemaType})`);
|
|
173
|
+
switch (change.status) {
|
|
174
|
+
case _semanticsEntities().APIDiffStatus.ADDED:
|
|
175
|
+
lines.push(` ${_chalk().default.green.bold('+')} ${_chalk().default.green(change.exportName)} ${kind} ${impact}`);
|
|
176
|
+
if (change.compareSignature) {
|
|
177
|
+
lines.push(`${indent}${_chalk().default.dim(this.truncateSig(change.compareSignature))}`);
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
case _semanticsEntities().APIDiffStatus.REMOVED:
|
|
181
|
+
lines.push(` ${_chalk().default.red.bold('−')} ${_chalk().default.red(change.exportName)} ${kind} ${impact}`);
|
|
182
|
+
if (change.baseSignature) {
|
|
183
|
+
lines.push(`${indent}${_chalk().default.dim.strikethrough(this.truncateSig(change.baseSignature))}`);
|
|
184
|
+
}
|
|
185
|
+
break;
|
|
186
|
+
case _semanticsEntities().APIDiffStatus.MODIFIED:
|
|
187
|
+
lines.push(` ${_chalk().default.yellow.bold('~')} ${_chalk().default.yellow(change.exportName)} ${kind} ${impact}`);
|
|
188
|
+
if (change.changes && change.changes.length > 0) {
|
|
189
|
+
for (const detail of change.changes) {
|
|
190
|
+
const detailImpact = this.impactDot(detail.impact);
|
|
191
|
+
const desc = this.enhanceDescription(detail.description, detail.impact, detail.changeKind);
|
|
192
|
+
lines.push(`${indent}${detailImpact} ${desc}`);
|
|
193
|
+
if (detail.from != null && detail.to != null) {
|
|
194
|
+
lines.push(`${indent} ${_chalk().default.red(`- ${detail.from}`)}`);
|
|
195
|
+
lines.push(`${indent} ${_chalk().default.green(`+ ${detail.to}`)}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
lines.push('');
|
|
202
|
+
return lines;
|
|
203
|
+
}
|
|
204
|
+
impactBadge(impact) {
|
|
205
|
+
return SchemaDiffCommand.IMPACT_STYLES[impact].badge;
|
|
206
|
+
}
|
|
207
|
+
impactTag(impact) {
|
|
208
|
+
return SchemaDiffCommand.IMPACT_STYLES[impact].tag;
|
|
209
|
+
}
|
|
210
|
+
impactDot(impact) {
|
|
211
|
+
return SchemaDiffCommand.IMPACT_STYLES[impact].dot;
|
|
212
|
+
}
|
|
213
|
+
enhanceDescription(description, impact, changeKind) {
|
|
214
|
+
const enhancer = SchemaDiffCommand.DESCRIPTION_ENHANCERS.find(e => e.match(changeKind, impact));
|
|
215
|
+
return enhancer ? enhancer.enhance(description) : description;
|
|
216
|
+
}
|
|
217
|
+
truncateSig(sig, maxLen = 120) {
|
|
218
|
+
const oneLine = sig.replace(/\n/g, ' ').replace(/\s+/g, ' ');
|
|
219
|
+
if (oneLine.length <= maxLen) return oneLine;
|
|
220
|
+
return `${oneLine.slice(0, maxLen - 3)}...`;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
exports.SchemaDiffCommand = SchemaDiffCommand;
|
|
224
|
+
_defineProperty(SchemaDiffCommand, "IMPACT_STYLES", {
|
|
225
|
+
BREAKING: {
|
|
226
|
+
badge: _chalk().default.bgRed.white.bold(' BREAKING '),
|
|
227
|
+
tag: _chalk().default.red('breaking'),
|
|
228
|
+
dot: _chalk().default.red('●')
|
|
229
|
+
},
|
|
230
|
+
NON_BREAKING: {
|
|
231
|
+
badge: _chalk().default.bgGreen.white.bold(' NON-BREAKING '),
|
|
232
|
+
tag: _chalk().default.green('non-breaking'),
|
|
233
|
+
dot: _chalk().default.green('●')
|
|
234
|
+
},
|
|
235
|
+
PATCH: {
|
|
236
|
+
badge: _chalk().default.bgBlue.white(' PATCH '),
|
|
237
|
+
tag: _chalk().default.dim('patch'),
|
|
238
|
+
dot: _chalk().default.dim('●')
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
_defineProperty(SchemaDiffCommand, "DESCRIPTION_ENHANCERS", [{
|
|
242
|
+
match: (ck, i) => ck === 'return-type-changed' && i === 'NON_BREAKING',
|
|
243
|
+
enhance: d => d.replace('return type changed:', 'return type widened:')
|
|
244
|
+
}, {
|
|
245
|
+
match: (ck, i) => ck === 'return-type-changed' && i === 'BREAKING',
|
|
246
|
+
enhance: d => d.replace('return type changed:', 'return type narrowed:')
|
|
247
|
+
}, {
|
|
248
|
+
match: (ck, i) => (ck === 'destructured-property-default-removed' || ck === 'parameter-default-removed') && i === 'BREAKING',
|
|
249
|
+
enhance: d => d.includes('breaking') ? d : `${d} — callers relying on the default will break`
|
|
250
|
+
}]);
|
|
251
|
+
|
|
252
|
+
//# sourceMappingURL=schema-diff.cmd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_semanticsEntities","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","SchemaDiffCommand","constructor","schema","component","logger","report","args","pattern","baseVersion","compareVersion","diff","componentId","computeDiff","formatDiffResult","json","toAgentJson","host","getHost","ids","idsByPattern","Error","baseId","changeVersion","compareId","baseComponent","compareComponent","getMany","toString","debug","baseSchema","compareSchema","Promise","all","getSchema","assessor","getImpactAssessor","computeAPIDiff","toStringWithoutVersion","serializeChange","change","status","impact","exportName","schemaType","baseSignature","compareSignature","changes","details","map","d","changeKind","description","context","from","undefined","to","hasChanges","summary","added","removed","modified","breaking","nonBreaking","patch","publicAPI","publicChanges","internal","internalChanges","chalk","green","lines","bold","cyan","impactBadge","parts","red","yellow","impactParts","dim","join","formatSection","title","underline","sortChanges","formatChange","order","REMOVED","MODIFIED","ADDED","impactOrder","BREAKING","NON_BREAKING","PATCH","sort","a","b","statusDiff","indent","impactTag","kind","APIDiffStatus","truncateSig","strikethrough","detail","detailImpact","impactDot","desc","enhanceDescription","IMPACT_STYLES","badge","tag","dot","enhancer","DESCRIPTION_ENHANCERS","find","match","enhance","sig","maxLen","oneLine","replace","slice","exports","bgRed","white","bgGreen","bgBlue","ck","includes"],"sources":["schema-diff.cmd.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { Command, CommandOptions, CLIArgs } from '@teambit/cli';\nimport type { ComponentMain } from '@teambit/component';\nimport type { Logger } from '@teambit/logger';\nimport { computeAPIDiff, APIDiffStatus } from '@teambit/semantics.entities.semantic-schema-diff';\nimport type { APIDiffResult, APIDiffChange, ImpactLevel } from '@teambit/semantics.entities.semantic-schema-diff';\nimport type { SchemaMain } from './schema.main.runtime';\n\nexport class SchemaDiffCommand implements Command {\n name = 'diff <component> <base-version> <compare-version>';\n description = 'show API changes between two versions of a component';\n extendedDescription = `compares the public API schema between two versions of a component.\nshows added, removed, and modified exports with semantic impact analysis.\n\nexamples:\n bit schema diff my-component 0.0.1 0.0.2`;\n group = 'info-analysis';\n options = [['j', 'json', 'return the API diff in json format']] as CommandOptions;\n\n constructor(\n private schema: SchemaMain,\n private component: ComponentMain,\n private logger: Logger\n ) {}\n\n async report(args: CLIArgs): Promise<string> {\n const [pattern, baseVersion, compareVersion] = args as string[];\n const { diff, componentId } = await this.computeDiff(pattern, baseVersion, compareVersion);\n return this.formatDiffResult(diff, `${componentId} (${baseVersion} → ${compareVersion})`);\n }\n\n async json(args: CLIArgs): Promise<Record<string, any>> {\n const [pattern, baseVersion, compareVersion] = args as string[];\n const { diff, componentId } = await this.computeDiff(pattern, baseVersion, compareVersion);\n return this.toAgentJson(diff, componentId, baseVersion, compareVersion);\n }\n\n private async computeDiff(\n pattern: string,\n baseVersion: string,\n compareVersion: string\n ): Promise<{ diff: APIDiffResult; componentId: string }> {\n const host = this.component.getHost();\n const ids = await host.idsByPattern(pattern, true);\n\n if (ids.length === 0) {\n throw new Error(`no components found matching \"${pattern}\"`);\n }\n if (ids.length > 1) {\n throw new Error(`pattern \"${pattern}\" matches ${ids.length} components. please specify a single component.`);\n }\n\n const componentId = ids[0];\n const baseId = componentId.changeVersion(baseVersion);\n const compareId = componentId.changeVersion(compareVersion);\n\n const [baseComponent, compareComponent] = await host.getMany([baseId, compareId]);\n\n if (!baseComponent) throw new Error(`could not load ${baseId.toString()}`);\n if (!compareComponent) throw new Error(`could not load ${compareId.toString()}`);\n\n this.logger.debug(`computing API diff: ${baseId.toString()} -> ${compareId.toString()}`);\n\n const [baseSchema, compareSchema] = await Promise.all([\n this.schema.getSchema(baseComponent),\n this.schema.getSchema(compareComponent),\n ]);\n\n const assessor = this.schema.getImpactAssessor();\n const diff = computeAPIDiff(baseSchema, compareSchema, assessor);\n return { diff, componentId: componentId.toStringWithoutVersion() };\n }\n\n private toAgentJson(\n diff: APIDiffResult,\n componentId: string,\n baseVersion: string,\n compareVersion: string\n ): Record<string, any> {\n const serializeChange = (change: APIDiffChange) => ({\n status: change.status,\n impact: change.impact,\n exportName: change.exportName,\n schemaType: change.schemaType,\n ...(change.baseSignature ? { baseSignature: change.baseSignature } : {}),\n ...(change.compareSignature ? { compareSignature: change.compareSignature } : {}),\n ...(change.changes && change.changes.length > 0\n ? {\n details: change.changes.map((d) => ({\n changeKind: d.changeKind,\n description: d.description,\n impact: d.impact,\n context: d.context,\n ...(d.from !== undefined ? { from: d.from } : {}),\n ...(d.to !== undefined ? { to: d.to } : {}),\n })),\n }\n : {}),\n });\n\n return {\n componentId,\n baseVersion,\n compareVersion,\n hasChanges: diff.hasChanges,\n impact: diff.impact,\n summary: {\n added: diff.added,\n removed: diff.removed,\n modified: diff.modified,\n breaking: diff.breaking,\n nonBreaking: diff.nonBreaking,\n patch: diff.patch,\n },\n publicAPI: diff.publicChanges.map(serializeChange),\n internal: diff.internalChanges.map(serializeChange),\n };\n }\n\n private formatDiffResult(diff: APIDiffResult, pattern: string): string {\n if (!diff.hasChanges) {\n return chalk.green(`\\n No API changes detected for ${pattern}\\n`);\n }\n\n const lines: string[] = [''];\n\n lines.push(` ${chalk.bold('API Diff')} for ${chalk.cyan(pattern)} ${this.impactBadge(diff.impact)}`);\n lines.push('');\n\n const parts: string[] = [];\n if (diff.added > 0) parts.push(chalk.green(`${diff.added} added`));\n if (diff.removed > 0) parts.push(chalk.red(`${diff.removed} removed`));\n if (diff.modified > 0) parts.push(chalk.yellow(`${diff.modified} modified`));\n const impactParts: string[] = [];\n if (diff.breaking > 0) impactParts.push(chalk.red.bold(`${diff.breaking} breaking`));\n if (diff.nonBreaking > 0) impactParts.push(chalk.green(`${diff.nonBreaking} non-breaking`));\n if (diff.patch > 0) impactParts.push(chalk.dim(`${diff.patch} patch`));\n lines.push(` ${parts.join(chalk.dim(' · '))} ${chalk.dim('|')} ${impactParts.join(chalk.dim(' · '))}`);\n lines.push('');\n\n this.formatSection(lines, 'Public API', diff.publicChanges);\n this.formatSection(lines, 'Internal (non-exported)', diff.internalChanges);\n\n return lines.join('\\n');\n }\n\n private formatSection(lines: string[], title: string, changes: APIDiffChange[]): void {\n if (changes.length === 0) return;\n lines.push(` ${chalk.bold.underline(title)}`);\n lines.push('');\n for (const change of this.sortChanges(changes)) {\n lines.push(...this.formatChange(change));\n }\n }\n\n private sortChanges(changes: APIDiffChange[]): APIDiffChange[] {\n const order = { REMOVED: 0, MODIFIED: 1, ADDED: 2 };\n const impactOrder = { BREAKING: 0, NON_BREAKING: 1, PATCH: 2 };\n return [...changes].sort((a, b) => {\n const statusDiff = (order[a.status] ?? 3) - (order[b.status] ?? 3);\n if (statusDiff !== 0) return statusDiff;\n return (impactOrder[a.impact] ?? 3) - (impactOrder[b.impact] ?? 3);\n });\n }\n\n private formatChange(change: APIDiffChange): string[] {\n const lines: string[] = [];\n const indent = ' ';\n const impact = this.impactTag(change.impact);\n const kind = chalk.dim(`(${change.schemaType})`);\n\n switch (change.status) {\n case APIDiffStatus.ADDED:\n lines.push(` ${chalk.green.bold('+')} ${chalk.green(change.exportName)} ${kind} ${impact}`);\n if (change.compareSignature) {\n lines.push(`${indent}${chalk.dim(this.truncateSig(change.compareSignature))}`);\n }\n break;\n\n case APIDiffStatus.REMOVED:\n lines.push(` ${chalk.red.bold('−')} ${chalk.red(change.exportName)} ${kind} ${impact}`);\n if (change.baseSignature) {\n lines.push(`${indent}${chalk.dim.strikethrough(this.truncateSig(change.baseSignature))}`);\n }\n break;\n\n case APIDiffStatus.MODIFIED:\n lines.push(` ${chalk.yellow.bold('~')} ${chalk.yellow(change.exportName)} ${kind} ${impact}`);\n if (change.changes && change.changes.length > 0) {\n for (const detail of change.changes) {\n const detailImpact = this.impactDot(detail.impact);\n const desc = this.enhanceDescription(detail.description, detail.impact, detail.changeKind);\n lines.push(`${indent}${detailImpact} ${desc}`);\n if (detail.from != null && detail.to != null) {\n lines.push(`${indent} ${chalk.red(`- ${detail.from}`)}`);\n lines.push(`${indent} ${chalk.green(`+ ${detail.to}`)}`);\n }\n }\n }\n break;\n }\n\n lines.push('');\n return lines;\n }\n\n private static IMPACT_STYLES = {\n BREAKING: { badge: chalk.bgRed.white.bold(' BREAKING '), tag: chalk.red('breaking'), dot: chalk.red('●') },\n NON_BREAKING: {\n badge: chalk.bgGreen.white.bold(' NON-BREAKING '),\n tag: chalk.green('non-breaking'),\n dot: chalk.green('●'),\n },\n PATCH: { badge: chalk.bgBlue.white(' PATCH '), tag: chalk.dim('patch'), dot: chalk.dim('●') },\n };\n\n private impactBadge(impact: ImpactLevel): string {\n return SchemaDiffCommand.IMPACT_STYLES[impact].badge;\n }\n private impactTag(impact: ImpactLevel): string {\n return SchemaDiffCommand.IMPACT_STYLES[impact].tag;\n }\n private impactDot(impact: ImpactLevel): string {\n return SchemaDiffCommand.IMPACT_STYLES[impact].dot;\n }\n\n private static DESCRIPTION_ENHANCERS: Array<{\n match: (changeKind: string, impact: ImpactLevel) => boolean;\n enhance: (desc: string) => string;\n }> = [\n {\n match: (ck, i) => ck === 'return-type-changed' && i === 'NON_BREAKING',\n enhance: (d) => d.replace('return type changed:', 'return type widened:'),\n },\n {\n match: (ck, i) => ck === 'return-type-changed' && i === 'BREAKING',\n enhance: (d) => d.replace('return type changed:', 'return type narrowed:'),\n },\n {\n match: (ck, i) =>\n (ck === 'destructured-property-default-removed' || ck === 'parameter-default-removed') && i === 'BREAKING',\n enhance: (d) => (d.includes('breaking') ? d : `${d} — callers relying on the default will break`),\n },\n ];\n\n private enhanceDescription(description: string, impact: ImpactLevel, changeKind: string): string {\n const enhancer = SchemaDiffCommand.DESCRIPTION_ENHANCERS.find((e) => e.match(changeKind, impact));\n return enhancer ? enhancer.enhance(description) : description;\n }\n\n private truncateSig(sig: string, maxLen = 120): string {\n const oneLine = sig.replace(/\\n/g, ' ').replace(/\\s+/g, ' ');\n if (oneLine.length <= maxLen) return oneLine;\n return `${oneLine.slice(0, maxLen - 3)}...`;\n }\n}\n"],"mappings":";;;;;;AAAA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAG,mBAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,kBAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAiG,SAAAC,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAA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AAC,KACX,CAACuI,EAAE,KAAK,uCAAuC,IAAIA,EAAE,KAAK,2BAA2B,KAAKvI,CAAC,KAAK,UAAU;EAC5G4H,OAAO,EAAGnE,CAAC,IAAMA,CAAC,CAAC+E,QAAQ,CAAC,UAAU,CAAC,GAAG/E,CAAC,GAAG,GAAGA,CAAC;AACpD,CAAC,CACF","ignoreList":[]}
|
package/dist/schema.cmd.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ export declare class SchemaCommand implements Command {
|
|
|
11
11
|
extendedDescription: string;
|
|
12
12
|
group: string;
|
|
13
13
|
options: CommandOptions;
|
|
14
|
+
commands: Command[];
|
|
14
15
|
constructor(schema: SchemaMain, component: ComponentMain, logger: Logger);
|
|
15
16
|
report([pattern]: [string], { remote }: {
|
|
16
17
|
remote: boolean;
|