@electroplix/adapter 0.1.0 → 0.1.2
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.esm.js +43 -41
- package/dist/src/lib/logger.d.ts +11 -8
- package/dist/src/lib/logger.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -101,10 +101,6 @@ function checkVersionStability(version) {
|
|
|
101
101
|
return 'unknown';
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
/* ------------------------------------------------------------------ */
|
|
105
|
-
/* Simple coloured logger – zero dependencies */
|
|
106
|
-
/* ------------------------------------------------------------------ */
|
|
107
|
-
|
|
108
104
|
const RESET = '\x1b[0m';
|
|
109
105
|
const BOLD = '\x1b[1m';
|
|
110
106
|
const GREEN = '\x1b[32m';
|
|
@@ -113,47 +109,53 @@ const RED = '\x1b[31m';
|
|
|
113
109
|
const CYAN = '\x1b[36m';
|
|
114
110
|
const DIM = '\x1b[2m';
|
|
115
111
|
const ORANGE = '\x1b[38;5;208m';
|
|
116
|
-
|
|
117
|
-
info(
|
|
118
|
-
console.log(`${CYAN}
|
|
119
|
-
}
|
|
120
|
-
success(
|
|
121
|
-
console.log(`${GREEN}
|
|
122
|
-
}
|
|
123
|
-
warn(
|
|
124
|
-
console.log(`${YELLOW}
|
|
125
|
-
}
|
|
126
|
-
error(
|
|
127
|
-
console.
|
|
128
|
-
}
|
|
129
|
-
step(
|
|
130
|
-
console.log(
|
|
131
|
-
}
|
|
132
|
-
dim(
|
|
133
|
-
console.log(
|
|
134
|
-
}
|
|
112
|
+
class Logger {
|
|
113
|
+
info(message) {
|
|
114
|
+
console.log(`${CYAN}ℹ ${RESET}${message}`);
|
|
115
|
+
}
|
|
116
|
+
success(message) {
|
|
117
|
+
console.log(`${GREEN}✓ ${RESET}${message}`);
|
|
118
|
+
}
|
|
119
|
+
warn(message) {
|
|
120
|
+
console.log(`${YELLOW}⚠ ${RESET}${message}`);
|
|
121
|
+
}
|
|
122
|
+
error(message) {
|
|
123
|
+
console.log(`${RED}✖ ${RESET}${message}`);
|
|
124
|
+
}
|
|
125
|
+
step(message) {
|
|
126
|
+
console.log(`${CYAN}● ${RESET}${BOLD}${message}${RESET}`);
|
|
127
|
+
}
|
|
128
|
+
dim(message) {
|
|
129
|
+
console.log(` ${DIM}${message}${RESET}`);
|
|
130
|
+
}
|
|
131
|
+
debug(message) {
|
|
132
|
+
console.log(`${DIM}⋯ ${message}${RESET}`);
|
|
133
|
+
}
|
|
134
|
+
newline() {
|
|
135
|
+
console.log('');
|
|
136
|
+
}
|
|
135
137
|
banner() {
|
|
136
138
|
console.log('');
|
|
137
|
-
console.log(`${BOLD}${CYAN}
|
|
138
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
139
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
140
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
141
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
142
|
-
console.log(`${BOLD}${CYAN} ║${RESET} ${
|
|
143
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
144
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
145
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
146
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
147
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
148
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
149
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
150
|
-
console.log(`${BOLD}${CYAN} ║${RESET} ${
|
|
151
|
-
console.log(`${BOLD}${CYAN} ║${RESET}
|
|
152
|
-
console.log(`${BOLD}${CYAN}
|
|
153
|
-
console.log(`${BOLD}${CYAN} ╚═══════════════════════════════════════════════════════════╝${RESET}`);
|
|
139
|
+
console.log(`${BOLD}${CYAN} ╔════════════════════════════════════════════════════════╗${RESET}`);
|
|
140
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}___${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
141
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}[${RESET}${YELLOW}o${RESET}${DIM}]${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
142
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.-"""${YELLOW}⚡${ORANGE}"""""--.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
143
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}.' ${YELLOW}⚡${RESET} ${ORANGE}\\ '.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
144
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}/ ${YELLOW}⚡${RESET} ${ORANGE}\\ ; \\${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
145
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}|${RESET}${YELLOW} ⚡${RESET} ${ORANGE}=====${RESET} ${ORANGE}'; |${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
146
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}\\ ${YELLOW}⚡${RESET} ${ORANGE}/ .' /${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
147
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${ORANGE}'-..__..--' ${DIM}_.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
148
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}_.~" ~._.~" ${RESET}${DIM} ~._.~"~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
149
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}~" ~._.~" ~._.~" ~.${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
150
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
151
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${YELLOW}⚡ Electroplix Deploy Adapter${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
152
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${DIM}Cloudflare Workers deploy for Next.js${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
153
|
+
console.log(`${BOLD}${CYAN} ║${RESET} ${BOLD}${CYAN}║${RESET}`);
|
|
154
|
+
console.log(`${BOLD}${CYAN} ╚════════════════════════════════════════════════════════╝${RESET}`);
|
|
154
155
|
console.log('');
|
|
155
156
|
}
|
|
156
|
-
}
|
|
157
|
+
}
|
|
158
|
+
const logger = new Logger();
|
|
157
159
|
|
|
158
160
|
/* ------------------------------------------------------------------ */
|
|
159
161
|
/* Install/uninstall packages via detected package manager */
|
package/dist/src/lib/logger.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
info(
|
|
3
|
-
success(
|
|
4
|
-
warn(
|
|
5
|
-
error(
|
|
6
|
-
step(
|
|
7
|
-
dim(
|
|
1
|
+
export declare class Logger {
|
|
2
|
+
info(message: string): void;
|
|
3
|
+
success(message: string): void;
|
|
4
|
+
warn(message: string): void;
|
|
5
|
+
error(message: string): void;
|
|
6
|
+
step(message: string): void;
|
|
7
|
+
dim(message: string): void;
|
|
8
|
+
debug(message: string): void;
|
|
9
|
+
newline(): void;
|
|
8
10
|
banner(): void;
|
|
9
|
-
}
|
|
11
|
+
}
|
|
12
|
+
export declare const logger: Logger;
|
|
10
13
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../packages/adapter/src/lib/logger.ts"],"names":[],"mappings":"AASA,qBAAa,MAAM;IACjB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,OAAO,CAAC,OAAO,EAAE,MAAM;IAIvB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,IAAI,CAAC,OAAO,EAAE,MAAM;IAIpB,GAAG,CAAC,OAAO,EAAE,MAAM;IAInB,KAAK,CAAC,OAAO,EAAE,MAAM;IAIrB,OAAO;IAIP,MAAM;CAoBP;AAED,eAAO,MAAM,MAAM,QAAe,CAAC"}
|