@domstack/sync
Advanced tools
+9
-4
@@ -62,4 +62,8 @@ #!/usr/bin/env node | ||
| type: 'string', | ||
| help: 'Log level: silent|info|debug', | ||
| help: 'Log level: silent|debug|info|warn|error', | ||
| }, | ||
| 'log-connections': { | ||
| type: 'boolean', | ||
| help: 'Log browser connection events at info level', | ||
| }, | ||
| help: { | ||
@@ -129,3 +133,3 @@ type: 'boolean', | ||
| const config = `// @domstack/sync config | ||
| // https://github.com/bcomnes/browser-sync | ||
| // https://github.com/bcomnes/domstack-sync | ||
| module.exports = { | ||
@@ -137,3 +141,3 @@ server: '.', | ||
| `; | ||
| const dest = resolve(process.cwd(), 'bs-config.js'); | ||
| const dest = resolve(process.cwd(), 'domstack-sync.config.js'); | ||
| writeFileSync(dest, config); | ||
@@ -166,3 +170,3 @@ process.stdout.write(`Created ${dest}\n`); | ||
| let fileConfig = {}; | ||
| const configPath = resolve(process.cwd(), 'bs-config.js'); | ||
| const configPath = resolve(process.cwd(), 'domstack-sync.config.js'); | ||
| if (existsSync(configPath)) { | ||
@@ -192,4 +196,5 @@ try { | ||
| ...(values['log-level'] !== undefined ? { logLevel: values['log-level'] } : {}), | ||
| ...(values['log-connections'] ? { logConnections: true } : {}), | ||
| ...(values['no-ghost-mode'] ? { ghostMode: { scroll: false, clicks: false, location: false, forms: false } } : {}), | ||
| }); | ||
| await createServer(opts); |
@@ -1,2 +0,2 @@ | ||
| import type { FastifyInstance } from 'fastify'; | ||
| import type { FastifyBaseLogger, FastifyInstance, FastifyTypeProvider, FastifyTypeProviderDefault, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerBase, RawServerDefault } from 'fastify'; | ||
| export interface InjectorRule { | ||
@@ -17,3 +17,3 @@ match: RegExp; | ||
| } | ||
| export declare function registerInjector(fastify: FastifyInstance, snippet: string, options?: InjectorOptions): void; | ||
| export declare function registerInjector<RawServer extends RawServerBase = RawServerDefault, Logger extends FastifyBaseLogger = FastifyBaseLogger, TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault>(fastify: FastifyInstance<RawServer, RawRequestDefaultExpression<RawServer>, RawReplyDefaultExpression<RawServer>, Logger, TypeProvider>, snippet: string, options?: InjectorOptions): void; | ||
| //# sourceMappingURL=injector.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"injector.d.ts","sourceRoot":"","sources":["injector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE9C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC/C;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B;AAUD,wBAAgB,gBAAgB,CAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI,CA+BhH"} | ||
| {"version":3,"file":"injector.d.ts","sourceRoot":"","sources":["injector.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,2BAA2B,EAC3B,aAAa,EACb,gBAAgB,EACjB,MAAM,SAAS,CAAA;AAEhB,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,EAAE,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC/C;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,EAAE,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAA;CAC7B;AAUD,wBAAgB,gBAAgB,CAC9B,SAAS,SAAS,aAAa,GAAG,gBAAgB,EAClD,MAAM,SAAS,iBAAiB,GAAG,iBAAiB,EACpD,YAAY,SAAS,mBAAmB,GAAG,0BAA0B,EAErE,OAAO,EAAE,eAAe,CACtB,SAAS,EACT,2BAA2B,CAAC,SAAS,CAAC,EACtC,yBAAyB,CAAC,SAAS,CAAC,EACpC,MAAM,EACN,YAAY,CACb,EACD,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,eAAoB,GAC5B,IAAI,CA+BN"} |
+26
-4
@@ -1,5 +0,27 @@ | ||
| import pino from 'pino'; | ||
| export type LogLevel = 'silent' | 'info' | 'debug' | 'warn' | 'error'; | ||
| export declare function createLogger(level?: LogLevel): pino.Logger<never, boolean>; | ||
| export type Logger = ReturnType<typeof createLogger>; | ||
| import type { Logger as PinoLogger } from 'pino'; | ||
| import type { Writable as WritableType } from 'node:stream'; | ||
| export type LogLevel = 'silent' | 'debug' | 'info' | 'warn' | 'error'; | ||
| type LogMethod = Exclude<LogLevel, 'silent'>; | ||
| type LogStream = Pick<WritableType, 'write'>; | ||
| export interface LoggerStreams { | ||
| stdout?: LogStream; | ||
| stderr?: LogStream; | ||
| } | ||
| export interface AccessUrls { | ||
| local?: string | null; | ||
| external?: string | null; | ||
| ui?: string | null; | ||
| uiExternal?: string | null; | ||
| } | ||
| export interface Logger { | ||
| pino: PinoLogger; | ||
| debug: (message: string, ...args: unknown[]) => void; | ||
| info: (message: string, ...args: unknown[]) => void; | ||
| warn: (message: string, ...args: unknown[]) => void; | ||
| error: (message: string, ...args: unknown[]) => void; | ||
| unprefixed: (level: LogMethod, message: string, ...args: unknown[]) => void; | ||
| urls: (urls: AccessUrls) => void; | ||
| } | ||
| export declare function createLogger(level?: LogLevel | string, streams?: LoggerStreams): Logger; | ||
| export {}; | ||
| //# sourceMappingURL=logger.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["logger.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAA;AAErE,wBAAgB,YAAY,CAAE,KAAK,GAAE,QAAiB,+BAQrD;AAED,MAAM,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAA"} | ||
| {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["logger.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAA;AAChD,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,aAAa,CAAA;AAE3D,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AACrE,KAAK,SAAS,GAAG,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;AAC5C,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;AAE5C,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,MAAM,CAAC,EAAE,SAAS,CAAA;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACpD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACnD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACnD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IACpD,UAAU,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;IAC3E,IAAI,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAA;CACjC;AAYD,wBAAgB,YAAY,CAAE,KAAK,GAAE,QAAQ,GAAG,MAAe,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAmCpG"} |
+134
-6
| import pino from 'pino'; | ||
| export function createLogger(level = 'info') { | ||
| const isDev = process.stdout.isTTY; | ||
| const opts = isDev | ||
| ? { level, transport: { target: 'pino-pretty', options: { colorize: true } } } | ||
| : { level }; | ||
| return pino(opts); | ||
| import pretty from 'pino-pretty'; | ||
| import { Writable } from 'node:stream'; | ||
| import { format } from 'node:util'; | ||
| const PREFIX = '[domstack-sync]'; | ||
| const LOG_LEVELS = { | ||
| debug: 10, | ||
| info: 20, | ||
| warn: 30, | ||
| error: 40, | ||
| silent: 50, | ||
| }; | ||
| export function createLogger(level = 'info', streams = {}) { | ||
| const logLevel = normalizeLogLevel(level); | ||
| const rawStdout = streams.stdout ?? process.stdout; | ||
| const stdout = toWritableStream(rawStdout); | ||
| const stream = pretty({ | ||
| colorize: isTty(rawStdout), | ||
| hideObject: true, | ||
| ignore: 'pid,hostname,time,level,bsPrefix,component,req,reqId,res,responseTime', | ||
| messageFormat: formatPrettyMessage, | ||
| destination: stdout, | ||
| sync: true, | ||
| }); | ||
| const pinoLogger = pino({ | ||
| level: logLevel, | ||
| base: null, | ||
| timestamp: false, | ||
| }, stream); | ||
| const log = (method, message, ...args) => { | ||
| emit(pinoLogger, method, { bsPrefix: true }, format(message, ...args)); | ||
| }; | ||
| const unprefixed = (method, message, ...args) => { | ||
| emit(pinoLogger, method, { bsPrefix: false }, format(message, ...args)); | ||
| }; | ||
| return { | ||
| pino: pinoLogger, | ||
| debug: (message, ...args) => log('debug', message, ...args), | ||
| info: (message, ...args) => log('info', message, ...args), | ||
| warn: (message, ...args) => log('warn', message, ...args), | ||
| error: (message, ...args) => log('error', message, ...args), | ||
| unprefixed, | ||
| urls: urls => logAccessUrls(urls, { info: (message, ...args) => log('info', message, ...args), unprefixed }), | ||
| }; | ||
| } | ||
| function emit(logger, level, bindings, message) { | ||
| if (level === 'debug') | ||
| logger.debug(bindings, message); | ||
| else if (level === 'info') | ||
| logger.info(bindings, message); | ||
| else if (level === 'warn') | ||
| logger.warn(bindings, message); | ||
| else | ||
| logger.error(bindings, message); | ||
| } | ||
| function normalizeLogLevel(level) { | ||
| return isLogLevel(level) ? level : 'info'; | ||
| } | ||
| function isLogLevel(level) { | ||
| return level in LOG_LEVELS; | ||
| } | ||
| function toWritableStream(stream) { | ||
| return new Writable({ | ||
| write(chunk, _encoding, callback) { | ||
| stream.write(String(chunk)); | ||
| callback(); | ||
| }, | ||
| }); | ||
| } | ||
| function isTty(stream) { | ||
| return Boolean(stream.isTTY); | ||
| } | ||
| function formatPrettyMessage(log, messageKey) { | ||
| const rawMessage = log[messageKey]; | ||
| const message = typeof rawMessage === 'string' ? rawMessage : String(rawMessage ?? ''); | ||
| const formatted = log['component'] === 'fastify' | ||
| ? formatFastifyMessage(log, message) | ||
| : message; | ||
| return log['bsPrefix'] === false ? formatted : `${PREFIX} ${formatted}`; | ||
| } | ||
| function formatFastifyMessage(log, fallback) { | ||
| const req = getRecord(log['req']); | ||
| const res = getRecord(log['res']); | ||
| const method = typeof req?.['method'] === 'string' ? req['method'] : null; | ||
| const url = typeof req?.['url'] === 'string' ? req['url'] : null; | ||
| if (res) { | ||
| const statusCode = typeof res['statusCode'] === 'number' ? res['statusCode'] : null; | ||
| const responseTime = typeof log['responseTime'] === 'number' ? `${Math.round(log['responseTime'])}ms` : null; | ||
| return [ | ||
| 'HTTP response:', | ||
| method, | ||
| url, | ||
| statusCode ? `-> ${statusCode}` : null, | ||
| responseTime ? `(${responseTime})` : null, | ||
| ].filter(Boolean).join(' '); | ||
| } | ||
| if (req) { | ||
| return ['HTTP request:', method, url].filter(Boolean).join(' '); | ||
| } | ||
| return fallback; | ||
| } | ||
| function getRecord(value) { | ||
| return value && typeof value === 'object' ? value : null; | ||
| } | ||
| function logAccessUrls(urls, logger) { | ||
| const entries = [ | ||
| ['local', urls.local], | ||
| ['external', urls.external], | ||
| ['ui', urls.ui], | ||
| ['ui-external', urls.uiExternal], | ||
| ]; | ||
| const filtered = entries.filter((entry) => typeof entry[1] === 'string' && entry[1].length > 0); | ||
| if (filtered.length === 0) | ||
| return; | ||
| const longestName = Math.max(...filtered.map(([key]) => getUrlLabel(key).length)); | ||
| const longestUrl = Math.max(...filtered.map(([, url]) => url.length)); | ||
| const underline = '-'.repeat(longestName + longestUrl + 4); | ||
| let splitUi = false; | ||
| logger.info('Access URLs:'); | ||
| logger.unprefixed('info', ' %s', underline); | ||
| for (const [key, url] of filtered) { | ||
| if (!splitUi && key.startsWith('ui')) { | ||
| splitUi = true; | ||
| logger.unprefixed('info', ' %s', underline); | ||
| } | ||
| logger.unprefixed('info', ' %s: %s', getUrlLabel(key).padStart(longestName), url); | ||
| } | ||
| logger.unprefixed('info', ' %s', underline); | ||
| } | ||
| function getUrlLabel(key) { | ||
| if (key === 'ui') | ||
| return 'UI'; | ||
| if (key === 'ui-external') | ||
| return 'UI External'; | ||
| return key.charAt(0).toUpperCase() + key.slice(1); | ||
| } |
+6
-2
@@ -198,4 +198,7 @@ import type { FromSchema } from 'json-schema-to-ts'; | ||
| readonly type: "string"; | ||
| readonly enum: readonly ["silent", "info", "debug"]; | ||
| readonly enum: readonly ["silent", "debug", "info", "warn", "error"]; | ||
| }; | ||
| readonly logConnections: { | ||
| readonly type: "boolean"; | ||
| }; | ||
| readonly ui: { | ||
@@ -362,3 +365,4 @@ readonly oneOf: readonly [{ | ||
| ghostMode: GhostModeOptions; | ||
| logLevel: 'silent' | 'info' | 'debug'; | ||
| logLevel: 'silent' | 'debug' | 'info' | 'warn' | 'error'; | ||
| logConnections: boolean; | ||
| ui: boolean | { | ||
@@ -365,0 +369,0 @@ port: number; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAc,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE9D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EA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AG,GAAE,cAAmB,GAAG,SAAS,CAoCjE;AAsID,wBAAgB,uBAAuB,CAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,qBAAqB,CAAC,GAAG,SAAS,GAAG,qBAAqB,CAczH;AAED,wBAAgB,mBAAmB,CAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,yBAAyB,CAAC,WAAW,CAAC,GAAG,gBAAgB,CAiB/H"} |
+3
-1
@@ -85,3 +85,4 @@ const formsGhostModeSchema = { | ||
| ghostMode: { oneOf: [{ type: 'boolean' }, ghostModeSchema] }, | ||
| logLevel: { type: 'string', enum: ['silent', 'info', 'debug'] }, | ||
| logLevel: { type: 'string', enum: ['silent', 'debug', 'info', 'warn', 'error'] }, | ||
| logConnections: { type: 'boolean' }, | ||
| ui: { | ||
@@ -139,2 +140,3 @@ oneOf: [ | ||
| logLevel: raw.logLevel ?? 'info', | ||
| logConnections: raw.logConnections ?? false, | ||
| ui: raw.ui ?? true, | ||
@@ -141,0 +143,0 @@ notify: raw.notify ?? true, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAmBvC,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAG7D,OAAO,KAAK,EAAoD,eAAe,EAAE,MAAM,eAAe,CAAA;AAGtG,OAAO,KAAK,EAAwB,gBAAgB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAIhI,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG,IAAI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AK,IAAI,CAAA;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,MAAM,EAAE,IAAI,CAAA;CACb;AAMD,KAAK,SAAS,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,mBAAmB,GAAG,SAAS,CAAA;AAqGpE,wBAAsB,YAAY,CAAE,OAAO,GAAE,cAAc,GAAG,SAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CA+mBjG"} |
+47
-9
@@ -10,2 +10,3 @@ import Fastify from 'fastify'; | ||
| import { fileURLToPath } from 'node:url'; | ||
| import { createRequire } from 'node:module'; | ||
| import { createServer as createNetServer } from 'node:net'; | ||
@@ -26,2 +27,3 @@ import picomatch from 'picomatch'; | ||
| const __dirname = fileURLToPath(new URL('.', import.meta.url)); | ||
| const require = createRequire(import.meta.url); | ||
| const textResponseSchema = { | ||
@@ -115,3 +117,5 @@ 200: { type: 'string' }, | ||
| const events = new EventEmitter(); | ||
| const fastify = Fastify({ logger: false }).withTypeProvider(); | ||
| const fastify = Fastify(opts.logLevel === 'debug' | ||
| ? { loggerInstance: logger.pino.child({ component: 'fastify' }) } | ||
| : { logger: false }).withTypeProvider(); | ||
| let noCacheEnabled = false; | ||
@@ -163,4 +167,4 @@ let responseLatencyMs = 0; | ||
| const remoteDebugAssets = [ | ||
| { path: '/browser-sync/pesticide.css', file: resolve(__dirname, 'client/assets/pesticide.css') }, | ||
| { path: '/browser-sync/pesticide-depth.css', file: resolve(__dirname, 'client/assets/pesticide-depth.css') }, | ||
| { path: '/browser-sync/pesticide.css', file: require.resolve('pesticide/css/pesticide.css') }, | ||
| { path: '/browser-sync/pesticide-depth.css', file: require.resolve('pesticide/css/pesticide-depth.css') }, | ||
| ]; | ||
@@ -201,3 +205,3 @@ for (const asset of remoteDebugAssets) { | ||
| const message = typeof body?.message === 'string' ? body.message : ''; | ||
| sockets.broadcast({ type: 'notify', message }); | ||
| doNotify(message); | ||
| return reply.send({ ok: true }); | ||
@@ -301,6 +305,16 @@ }); | ||
| sockets.on('client:connect', (info) => { | ||
| if (opts.logConnections) | ||
| logger.info('Browser Connected: %s, version: %s', info.browser.name, info.browser.version); | ||
| else | ||
| logger.debug('Browser Connected: %s, version: %s', info.browser.name, info.browser.version); | ||
| events.emit('client:connect', info); | ||
| sendPluginElementsToClient(info.id); | ||
| }); | ||
| sockets.on('client:disconnect', (id) => events.emit('client:disconnect', id)); | ||
| sockets.on('client:disconnect', (id) => { | ||
| if (opts.logConnections) | ||
| logger.info('Browser Disconnected: %s', id); | ||
| else | ||
| logger.debug('Browser Disconnected: %s', id); | ||
| events.emit('client:disconnect', id); | ||
| }); | ||
| sockets.on('client:update', (info) => events.emit('client:update', info)); | ||
@@ -315,2 +329,5 @@ fastify.server.on('upgrade', (req, socket, head) => { | ||
| const watchFiles = [...opts.files, ...pluginManager.getWatchEntries(pluginApi)]; | ||
| function logFileEvent(evt) { | ||
| logger.info('File event [%s] : %s', evt.event, evt.path); | ||
| } | ||
| if (watchFiles.length > 0) { | ||
@@ -329,2 +346,3 @@ watcher = new BsWatcher({ | ||
| for (const evt of batch) { | ||
| logFileEvent(evt); | ||
| events.emit('file:change', evt); | ||
@@ -337,5 +355,7 @@ } | ||
| const url = `http://localhost:${port}`; | ||
| const externalUrl = `http://${localIp}:${port}`; | ||
| logger.info(`Server started at ${url}`); | ||
| logger.info(`Network: http://${localIp}:${port}`); | ||
| let uiInstance = null; | ||
| let uiUrl = null; | ||
| let uiExternalUrl = null; | ||
| const throttleServers = new Map(); | ||
@@ -346,3 +366,4 @@ if (opts.ui !== false) { | ||
| : await findFreePort(port + 1); | ||
| const uiUrl = `http://127.0.0.1:${uiPort}`; | ||
| uiUrl = `http://127.0.0.1:${uiPort}`; | ||
| uiExternalUrl = `http://${localIp}:${uiPort}`; | ||
| uiInstance = await createUiServer({ | ||
@@ -376,4 +397,12 @@ uiPort, | ||
| }); | ||
| logger.info(`UI panel at ${uiUrl}`); | ||
| } | ||
| logger.urls({ local: url, external: externalUrl, ui: uiUrl, uiExternal: uiExternalUrl }); | ||
| if (serverRoots.length > 0) { | ||
| for (const root of serverRoots) { | ||
| logger.info('Serving files from: %s', root); | ||
| } | ||
| } | ||
| if (watchFiles.length > 0) { | ||
| logger.info('Watching files...'); | ||
| } | ||
| let lastFileBroadcastAt = 0; | ||
@@ -394,2 +423,6 @@ let publicReloadDebounceTimer = null; | ||
| } | ||
| if (files && files.length > 1) | ||
| logger.info('Reloading Browsers... (buffered %s events)', files.length); | ||
| else | ||
| logger.info('Reloading Browsers...'); | ||
| sockets.broadcast({ type: 'reload' }); | ||
@@ -401,3 +434,5 @@ } | ||
| for (const file of files) { | ||
| events.emit('file:change', { path: file, event: 'change', namespace: 'core', timestamp: Date.now() }); | ||
| const evt = { path: file, event: 'change', namespace: 'core', timestamp: Date.now() }; | ||
| logFileEvent(evt); | ||
| events.emit('file:change', evt); | ||
| } | ||
@@ -463,2 +498,3 @@ } | ||
| function doNotify(message) { | ||
| logger.info('Notify: %s', message); | ||
| sockets.broadcast({ type: 'notify', message }); | ||
@@ -493,2 +529,3 @@ } | ||
| if (streamOpts.once !== true && changed.length > 0) { | ||
| logger.info('%s %s changed (%s)', changed.length, changed.length > 1 ? 'files' : 'file', changedBasenames.join(', ')); | ||
| events.emit('stream:changed', { changed: changedBasenames }); | ||
@@ -653,2 +690,3 @@ broadcastFiles(changed); | ||
| async exit() { | ||
| logger.debug('Exiting...'); | ||
| if (publicReloadDebounceTimer) | ||
@@ -655,0 +693,0 @@ clearTimeout(publicReloadDebounceTimer); |
+1
-1
@@ -717,3 +717,3 @@ import Fastify from 'fastify'; | ||
| title: 'UI', | ||
| tagline: 'Control panel for this BrowserSync instance', | ||
| tagline: 'Control panel for this domstack-sync instance', | ||
| url: state.uiUrl, | ||
@@ -720,0 +720,0 @@ sync: false, |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["help.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,eAAO,MAAM,gBAAgB,EAAE,YA4E9B,CAAA"} | ||
| {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["help.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,eAAO,MAAM,gBAAgB,EAAE,YAyE9B,CAAA"} |
@@ -10,6 +10,5 @@ import html from 'fragtml'; | ||
| <p class="lede"> | ||
| Browsersync is an open-source project created by | ||
| <a href="https://twitter.com/shaneOsbourne" target="_blank">Shane Osbourne</a>. | ||
| domstack-sync is a dependency-minimized live-reload server for static sites and local development workflows. | ||
| </p> | ||
| <p class="hint">The modern rewrite keeps these UI workflows aligned with the BrowserSync defaults while replacing the legacy dependency stack.</p> | ||
| <p class="hint">Use this panel to inspect connected browsers, file changes, sync options, and debugging tools for the current server.</p> | ||
| </div> | ||
@@ -21,3 +20,3 @@ </div> | ||
| <dt>Why is it not connecting?</dt> | ||
| <dd>Most connection issues happen when the page does not have a <code>body</code> tag. BrowserSync injects its client script near the closing body tag.</dd> | ||
| <dd>Most connection issues happen when the page does not have a <code>body</code> tag. domstack-sync injects its client script near the closing body tag.</dd> | ||
| <dt>Which mode should I use?</dt> | ||
@@ -27,14 +26,12 @@ <dd> | ||
| <li>Use server mode for simple HTML, CSS, and JavaScript files.</li> | ||
| <li>Legacy BrowserSync uses proxy mode when an existing app server owns the response path; this rewrite intentionally omits proxy and HTTPS handling for now.</li> | ||
| <li>Use snippet mode when you want to paste the client script into a page manually.</li> | ||
| <li>Use snippet mode when another local server owns the response path and you want to paste the client script into a page manually.</li> | ||
| </ul> | ||
| </dd> | ||
| <dt>Where can I report an issue?</dt> | ||
| <dd>Use the project issue tracker for this rewrite, and use the BrowserSync docs when checking expected legacy behavior.</dd> | ||
| <dd>Use the project issue tracker for bugs, feature requests, and documentation gaps.</dd> | ||
| </dl> | ||
| <p class="hint"> | ||
| BrowserSync reference: | ||
| <a href="https://www.browsersync.io/docs/" target="_blank">docs</a>, | ||
| <a href="https://github.com/BrowserSync/browser-sync/issues" target="_blank">issues</a>, | ||
| <a href="https://stackoverflow.com/questions/tagged/browser-sync" target="_blank">Stack Overflow</a>. | ||
| Project reference: | ||
| <a href="https://github.com/bcomnes/domstack-sync" target="_blank">repository</a>, | ||
| <a href="https://github.com/bcomnes/domstack-sync/issues" target="_blank">issues</a>. | ||
| </p> | ||
@@ -69,3 +66,3 @@ </div> | ||
| const bs = await createServer({ | ||
| const sync = await createServer({ | ||
| server: './public', | ||
@@ -75,6 +72,6 @@ files: ['**/*.css', '**/*.html'], | ||
| bs.reload() // trigger full reload | ||
| bs.reload(['a.css']) // CSS inject | ||
| bs.notify('Updated') // overlay message | ||
| await bs.exit() // shutdown</pre> | ||
| sync.reload() // trigger full reload | ||
| sync.reload(['a.css']) // CSS inject | ||
| sync.notify('Updated') // overlay message | ||
| await sync.exit() // shutdown</pre> | ||
| </div> | ||
@@ -81,0 +78,0 @@ </div> |
+11
-8
| { | ||
| "name": "@domstack/sync", | ||
| "description": "A modern, minimal live-reload dev server", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "author": "Bret Comnes <bcomnes@gmail.com> (https://bret.io)", | ||
@@ -25,3 +25,2 @@ "bugs": { | ||
| "lib/**/*.js", | ||
| "lib/client/assets/**/*.css", | ||
| "lib/client/dist/**/*.js", | ||
@@ -56,2 +55,3 @@ "lib/ui/public/**/*" | ||
| "htmx.org": "^4.0.0-beta4", | ||
| "pesticide": "1.3.1", | ||
| "picomatch": "^4.0.0", | ||
@@ -78,3 +78,4 @@ "pino": "^9.0.0", | ||
| "prepublishOnly": "releasearoni", | ||
| "prepack": "npm run build", | ||
| "prepare": "run-s build:assets", | ||
| "prepack": "run-s clean build:declaration", | ||
| "postpublish": "npm run clean", | ||
@@ -85,8 +86,10 @@ "test": "run-s test:*", | ||
| "test:node-test": "node --experimental-test-coverage --test-reporter=spec --test-reporter=lcov --test-reporter-destination=stdout --test-reporter-destination=lcov.info --test-timeout=10000 --test", | ||
| "test:playwright": "npm run build && playwright test --timeout=10000", | ||
| "test:playwright": "run-s build:assets test:playwright:*", | ||
| "test:playwright:run": "playwright test --timeout=10000", | ||
| "version": "releasearoni version", | ||
| "build": "npm run clean && run-p build:*", | ||
| "build:client": "esbuild lib/client/index.ts --bundle --platform=browser --target=es2020 --format=iife --global-name=BrowserSyncClient --minify --outfile=lib/client/dist/browser-sync-client.js", | ||
| "build:ui-js": "esbuild lib/ui/client.ts --bundle --platform=browser --target=es2020 --format=esm --minify --outfile=lib/ui/public/app.js", | ||
| "build:ui-css": "esbuild lib/ui/app/styles/index.css --bundle --minify --outfile=lib/ui/public/app.css", | ||
| "build": "run-s clean build:assets build:declaration", | ||
| "build:assets": "run-p build:assets:*", | ||
| "build:assets:client": "esbuild lib/client/index.ts --bundle --platform=browser --target=es2020 --format=iife --global-name=BrowserSyncClient --minify --outfile=lib/client/dist/browser-sync-client.js", | ||
| "build:assets:ui-js": "esbuild lib/ui/client.ts --bundle --platform=browser --target=es2020 --format=esm --minify --outfile=lib/ui/public/app.js", | ||
| "build:assets:ui-css": "esbuild lib/ui/app/styles/index.css --bundle --minify --outfile=lib/ui/public/app.css", | ||
| "build:declaration": "tsc -p declaration.tsconfig.json", | ||
@@ -93,0 +96,0 @@ "clean": "run-p clean:*", |
+18
-16
@@ -9,3 +9,3 @@ # @domstack/sync | ||
| A modern, minimal live-reload dev server. A love letter to browser-sync, rewritten from scratch: ESM-only, Fastify, native WebSocket, server-rendered HTMX UI panel. | ||
| A modern, dependency-minimized live-reload dev server. A love letter to browser-sync: ESM-only, Fastify, native WebSocket, and a server-rendered HTMX UI panel. | ||
@@ -51,3 +51,4 @@ ## Install | ||
| | `--cors` | — | Enable CORS headers | | ||
| | `--log-level` | `info` | `silent` \| `info` \| `debug` | | ||
| | `--log-level` | `info` | `silent` \| `debug` \| `info` \| `warn` \| `error` | | ||
| | `--log-connections` | — | Log browser connection events at info level | | ||
| | `--help`, `-h` | — | Show help text | | ||
@@ -61,3 +62,3 @@ | `--version`, `-v` | — | Show version | | ||
| const bs = await createServer({ | ||
| const sync = await createServer({ | ||
| server: './public', | ||
@@ -68,28 +69,28 @@ files: ['public/**/*.css', 'public/**/*.html'], | ||
| console.log(bs.url) // http://localhost:3000 | ||
| console.log(bs.uiUrl) // http://localhost:3001 | ||
| console.log(sync.url) // http://localhost:3000 | ||
| console.log(sync.uiUrl) // http://localhost:3001 | ||
| // Trigger a full reload | ||
| bs.reload() | ||
| sync.reload() | ||
| // CSS-inject a specific file (falls back to full reload if not matched) | ||
| bs.reload(['styles/main.css']) | ||
| sync.reload(['styles/main.css']) | ||
| // Show a notification overlay in connected browsers | ||
| bs.notify('Build complete') | ||
| sync.notify('Build complete') | ||
| // Stream integration — pipe any { path } objects through to trigger reloads | ||
| someReadableStream.pipe(bs.stream()) | ||
| someReadableStream.pipe(sync.stream()) | ||
| // Listen for server-side events | ||
| bs.events.on('client:connect', (info) => console.log('connected', info.ua)) | ||
| bs.events.on('client:disconnect', (id) => console.log('disconnected', id)) | ||
| bs.events.on('file:change', (evt) => console.log('changed', evt.path)) | ||
| sync.events.on('client:connect', (info) => console.log('connected', info.ua)) | ||
| sync.events.on('client:disconnect', (id) => console.log('disconnected', id)) | ||
| sync.events.on('file:change', (evt) => console.log('changed', evt.path)) | ||
| // Pause / resume watcher-triggered reloads (e.g. during a build) | ||
| bs.pause() | ||
| bs.resume() | ||
| sync.pause() | ||
| sync.resume() | ||
| // Graceful shutdown | ||
| await bs.exit() | ||
| await sync.exit() | ||
| ``` | ||
@@ -105,3 +106,4 @@ | ||
| | `ghostMode` | `{ scroll, clicks, forms }` | all `true` | Sync interactions across connected browsers | | ||
| | `logLevel` | `'silent' \| 'info' \| 'debug'` | `'info'` | Log verbosity | | ||
| | `logLevel` | `'silent' \| 'debug' \| 'info' \| 'warn' \| 'error'` | `'info'` | Log verbosity | | ||
| | `logConnections` | `boolean` | `false` | Log browser connection events at info level | | ||
| | `ui` | `boolean \| { port: number }` | `true` | UI panel — `false` disables, `{ port }` pins the port | | ||
@@ -108,0 +110,0 @@ | `notify` | `boolean` | `true` | Show notification overlay in connected browsers | |
| /* | ||
| pesticide v1.0.0 . @mrmrs . MIT | ||
| */ | ||
| body { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| article { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| nav { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| aside { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| section { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| header { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| footer { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h1 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h2 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h3 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h4 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h5 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| h6 { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| main { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| address { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| div { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| p { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| hr { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| pre { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| blockquote { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| ol { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| ul { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| li { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| dl { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| dt { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| dd { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| figure { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| figcaption { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| table { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| caption { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| thead { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| tbody { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| tfoot { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| tr { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| th { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| td { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| col { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| colgroup { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| button { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| datalist { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| fieldset { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| form { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| input { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| keygen { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| label { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| legend { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| meter { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| optgroup { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| option { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| output { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| progress { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| select { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| textarea { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| details { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| summary { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| command { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| menu { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| del { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| ins { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| img { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| iframe { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| embed { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| object { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| param { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| video { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| audio { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| source { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| canvas { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| track { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| map { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| area { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| a { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| em { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| strong { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| i { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| b { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| u { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| s { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| small { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| abbr { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| q { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| cite { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| dfn { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| sub { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| sup { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| time { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| code { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| kbd { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| samp { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| var { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| mark { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| bdi { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| bdo { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| ruby { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| rt { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| rp { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| span { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| br { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } | ||
| wbr { | ||
| -webkit-box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| box-shadow: 0 0 1rem rgba(0,0,0,0.6); | ||
| background-color: rgba(255,255,255,0.25); | ||
| } |
| body { | ||
| outline: 1px solid #2980b9 !important | ||
| } | ||
| article { | ||
| outline: 1px solid #3498db !important | ||
| } | ||
| nav { | ||
| outline: 1px solid #0088c3 !important | ||
| } | ||
| aside { | ||
| outline: 1px solid #33a0ce !important | ||
| } | ||
| section { | ||
| outline: 1px solid #66b8da !important | ||
| } | ||
| header { | ||
| outline: 1px solid #99cfe7 !important | ||
| } | ||
| footer { | ||
| outline: 1px solid #cce7f3 !important | ||
| } | ||
| h1 { | ||
| outline: 1px solid #162544 !important | ||
| } | ||
| h2 { | ||
| outline: 1px solid #314e6e !important | ||
| } | ||
| h3 { | ||
| outline: 1px solid #3e5e85 !important | ||
| } | ||
| h4 { | ||
| outline: 1px solid #449baf !important | ||
| } | ||
| h5 { | ||
| outline: 1px solid #c7d1cb !important | ||
| } | ||
| h6 { | ||
| outline: 1px solid #4371d0 !important | ||
| } | ||
| main { | ||
| outline: 1px solid #2f4f90 !important | ||
| } | ||
| address { | ||
| outline: 1px solid #1a2c51 !important | ||
| } | ||
| div { | ||
| outline: 1px solid #036cdb !important | ||
| } | ||
| p { | ||
| outline: 1px solid #ac050b !important | ||
| } | ||
| hr { | ||
| outline: 1px solid #ff063f !important | ||
| } | ||
| pre { | ||
| outline: 1px solid #850440 !important | ||
| } | ||
| blockquote { | ||
| outline: 1px solid #f1b8e7 !important | ||
| } | ||
| ol { | ||
| outline: 1px solid #ff050c !important | ||
| } | ||
| ul { | ||
| outline: 1px solid #d90416 !important | ||
| } | ||
| li { | ||
| outline: 1px solid #d90416 !important | ||
| } | ||
| dl { | ||
| outline: 1px solid #fd3427 !important | ||
| } | ||
| dt { | ||
| outline: 1px solid #ff0043 !important | ||
| } | ||
| dd { | ||
| outline: 1px solid #e80174 !important | ||
| } | ||
| figure { | ||
| outline: 1px solid #f0b !important | ||
| } | ||
| figcaption { | ||
| outline: 1px solid #bf0032 !important | ||
| } | ||
| table { | ||
| outline: 1px solid #0c9 !important | ||
| } | ||
| caption { | ||
| outline: 1px solid #37ffc4 !important | ||
| } | ||
| thead { | ||
| outline: 1px solid #98daca !important | ||
| } | ||
| tbody { | ||
| outline: 1px solid #64a7a0 !important | ||
| } | ||
| tfoot { | ||
| outline: 1px solid #22746b !important | ||
| } | ||
| tr { | ||
| outline: 1px solid #86c0b2 !important | ||
| } | ||
| th { | ||
| outline: 1px solid #a1e7d6 !important | ||
| } | ||
| td { | ||
| outline: 1px solid #3f5a54 !important | ||
| } | ||
| col { | ||
| outline: 1px solid #6c9a8f !important | ||
| } | ||
| colgroup { | ||
| outline: 1px solid #6c9a9d !important | ||
| } | ||
| button { | ||
| outline: 1px solid #da8301 !important | ||
| } | ||
| datalist { | ||
| outline: 1px solid #c06000 !important | ||
| } | ||
| fieldset { | ||
| outline: 1px solid #d95100 !important | ||
| } | ||
| form { | ||
| outline: 1px solid #d23600 !important | ||
| } | ||
| input { | ||
| outline: 1px solid #fca600 !important | ||
| } | ||
| keygen { | ||
| outline: 1px solid #b31e00 !important | ||
| } | ||
| label { | ||
| outline: 1px solid #ee8900 !important | ||
| } | ||
| legend { | ||
| outline: 1px solid #de6d00 !important | ||
| } | ||
| meter { | ||
| outline: 1px solid #e8630c !important | ||
| } | ||
| optgroup { | ||
| outline: 1px solid #b33600 !important | ||
| } | ||
| option { | ||
| outline: 1px solid #ff8a00 !important | ||
| } | ||
| output { | ||
| outline: 1px solid #ff9619 !important | ||
| } | ||
| progress { | ||
| outline: 1px solid #e57c00 !important | ||
| } | ||
| select { | ||
| outline: 1px solid #e26e0f !important | ||
| } | ||
| textarea { | ||
| outline: 1px solid #cc5400 !important | ||
| } | ||
| details { | ||
| outline: 1px solid #33848f !important | ||
| } | ||
| summary { | ||
| outline: 1px solid #60a1a6 !important | ||
| } | ||
| command { | ||
| outline: 1px solid #438da1 !important | ||
| } | ||
| menu { | ||
| outline: 1px solid #449da6 !important | ||
| } | ||
| del { | ||
| outline: 1px solid #bf0000 !important | ||
| } | ||
| ins { | ||
| outline: 1px solid #400000 !important | ||
| } | ||
| img { | ||
| outline: 1px solid #22746b !important | ||
| } | ||
| iframe { | ||
| outline: 1px solid #64a7a0 !important | ||
| } | ||
| embed { | ||
| outline: 1px solid #98daca !important | ||
| } | ||
| object { | ||
| outline: 1px solid #0c9 !important | ||
| } | ||
| param { | ||
| outline: 1px solid #37ffc4 !important | ||
| } | ||
| video { | ||
| outline: 1px solid #6ee866 !important | ||
| } | ||
| audio { | ||
| outline: 1px solid #027353 !important | ||
| } | ||
| source { | ||
| outline: 1px solid #012426 !important | ||
| } | ||
| canvas { | ||
| outline: 1px solid #a2f570 !important | ||
| } | ||
| track { | ||
| outline: 1px solid #59a600 !important | ||
| } | ||
| map { | ||
| outline: 1px solid #7be500 !important | ||
| } | ||
| area { | ||
| outline: 1px solid #305900 !important | ||
| } | ||
| a { | ||
| outline: 1px solid #ff62ab !important | ||
| } | ||
| em { | ||
| outline: 1px solid #800b41 !important | ||
| } | ||
| strong { | ||
| outline: 1px solid #ff1583 !important | ||
| } | ||
| i { | ||
| outline: 1px solid #803156 !important | ||
| } | ||
| b { | ||
| outline: 1px solid #cc1169 !important | ||
| } | ||
| u { | ||
| outline: 1px solid #ff0430 !important | ||
| } | ||
| s { | ||
| outline: 1px solid #f805e3 !important | ||
| } | ||
| small { | ||
| outline: 1px solid #d107b2 !important | ||
| } | ||
| abbr { | ||
| outline: 1px solid #4a0263 !important | ||
| } | ||
| q { | ||
| outline: 1px solid #240018 !important | ||
| } | ||
| cite { | ||
| outline: 1px solid #64003c !important | ||
| } | ||
| dfn { | ||
| outline: 1px solid #b4005a !important | ||
| } | ||
| sub { | ||
| outline: 1px solid #dba0c8 !important | ||
| } | ||
| sup { | ||
| outline: 1px solid #cc0256 !important | ||
| } | ||
| time { | ||
| outline: 1px solid #d6606d !important | ||
| } | ||
| code { | ||
| outline: 1px solid #e04251 !important | ||
| } | ||
| kbd { | ||
| outline: 1px solid #5e001f !important | ||
| } | ||
| samp { | ||
| outline: 1px solid #9c0033 !important | ||
| } | ||
| var { | ||
| outline: 1px solid #d90047 !important | ||
| } | ||
| mark { | ||
| outline: 1px solid #ff0053 !important | ||
| } | ||
| bdi { | ||
| outline: 1px solid #bf3668 !important | ||
| } | ||
| bdo { | ||
| outline: 1px solid #6f1400 !important | ||
| } | ||
| ruby { | ||
| outline: 1px solid #ff7b93 !important | ||
| } | ||
| rt { | ||
| outline: 1px solid #ff2f54 !important | ||
| } | ||
| rp { | ||
| outline: 1px solid #803e49 !important | ||
| } | ||
| span { | ||
| outline: 1px solid #cc2643 !important | ||
| } | ||
| br { | ||
| outline: 1px solid #db687d !important | ||
| } | ||
| wbr { | ||
| outline: 1px solid #db175b !important | ||
| } |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
133
1.53%8
-11.11%298892
-3.11%15
7.14%113
-1.74%5150
-10.4%7
16.67%+ Added
+ Added