- Kyohei Fukuda(福田京平)/ GitHub: hand-dot
- X: @labelmake / YouTube: @kyohei_dev / Zenn: @hand_dot / Web: kyohei.dev
- 挨拶・前置き・段階報告・絵文字禁止。結論ファースト
- 指摘すべきことは率直に指摘
| const { exec } = require('child_process'); | |
| // --- チェック対象の脆弱なパッケージリスト --- | |
| // 出典: https://www.aikido.dev/blog/npm-debug-and-chalk-packages-compromised | |
| const COMPROMISED_PACKAGES = { | |
| "backslash": "0.2.1", | |
| "chalk-template": "1.1.1", | |
| "supports-hyperlinks": "4.1.1", | |
| "has-ansi": "6.0.1", | |
| "simple-swizzle": "0.2.3", |
| .card { | |
| perspective: 1000px; | |
| cursor: pointer; | |
| } | |
| .card-inner { | |
| position: relative; | |
| transition: transform 0.6s; | |
| transform-style: preserve-3d; | |
| } |
| {"schemas":[{"image - p1":{"type":"image","content":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUgAAAGQBAMAAAA+V+RCAAAAAXNSR0IArs4c6QAAABtQTFRFAAAAR3BMAAAAAAAAAAAAAAAAAAAAAAAAAAAAqmQqwQAAAAh0Uk5TDQAvVYGtxusE1uR9AAAKg0lEQVR42tTbwU7bQBDG8TWoPeOBPoBbdbhiVMGV0Kr0GChSe0RtRfccEOROnP0eu8ckTMHrjD27/h4Afvo7u4kUxZXbjuboZ+Hx9vrz+6J8eW5rJKPHhYfr46J/JHn0u/DnuHcko/eF71Ub0j6k3P1Rr0jGIHs4bkPah5RbnveHZMBQ6VKHlMqjnpCMAdfUApk8pNx91QeSMex+C2R2IYFwrkcyht6yEsjkIeXutEjG8AtnApldSGBRqJAMk10JZHYhgaZSIBlG+yWQipAGKZ0ipNmr0uUaEmiKLZEMw52tkLqQD7f6PT7iv1uskLqQV06/nQ9ffswhF+oVUhMS07KX7Xz6+8ot5BQhBVLF/Pry0XGKkAKpGp3IRz7pjmQMiSz3TvB8s85I8h2ReuWy6IpkDIws6UI8745I8oMjy10vnnc3JGN4ZPlRnO9OSPIWyL0LcZ93QTIskOXuXPz9eCR5G2R5io09dUEyjJD7c3kJudiQJkiZMtTxSIYZ8mAu/oGLDGmHLL9hfXfRSIYh8g3W18QiyVsh5VdtoYpEMsyQ8uhM4pDk7ZDyeU/jkAw7pHzesygkeUOkPN+LKCTDGsnP3nNcREhz5MHm8Y5AMkyRskvdjiRvi5Qvyst2JCMB8hBru2lFkjdGypty1opkpEDuY21PbUjy1kh5nS/akIwkyL2fWK0pXEtIc6Q83ssWJCMR8nTjNncxIe2Rh/FIRirkW6ytdjEh7ZHvopGMFEj5EWPiYkLaI/djkYyEyDlWu3SakOmRjIRIWkdOnSJkeiQjfyT5ESAZ+SPJj |
| class FileUploader extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: 'open' }); | |
| const input = document.createElement('input'); | |
| input.type = 'file'; | |
| this.shadowRoot.appendChild(input); | |
| // inputのchangeイベントリスナーを設定 | |
| input.addEventListener('change', (event) => { |
| import { response, serverError } from 'wix-http-functions'; | |
| import { authentication } from 'wix-members-backend'; | |
| import wixData from 'wix-data'; | |
| import { fetch } from 'wix-fetch'; | |
| import { CLIENT_ID, CLIENT_SECRET, BASE_URL, LINE_TOKEN_URL, LINE_VERIFY_URL } from './constants'; | |
| async function fetchToken(request) { | |
| const tokenResponse = await fetch(LINE_TOKEN_URL, { | |
| method: "POST", | |
| headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| import wixData from "wix-data"; | |
| import { local } from "wix-storage"; | |
| // データベースへの処理 | |
| const tasksDB = { | |
| create: (task) => wixData.insert("Tasks", task), | |
| readByUserId: (userId) => wixData.query("Tasks").eq("userId", userId).find(), | |
| update: (task) => wixData.update("Tasks", task), | |
| deleteByIds: (ids) => wixData.bulkRemove("Tasks", ids), | |
| }; |
| import { ok, serverError } from 'wix-http-functions'; | |
| import { sql } from '@velo/wix-data-sql-backend'; | |
| /** | |
| * @param {import("wix-http-functions").WixHttpFunctionRequest} request | |
| */ | |
| export async function post_sql(request) { | |
| try { | |
| const reqBody = await request.body.json() |
| // To debug this code, open wixDefaultCustomElement.js in Developer Tools. | |
| const IMAGE_URL = 'https://wix.to/vUBXBKU'; | |
| const H2_TEXT = 'これはカスタム要素です'; | |
| const H3_1_TEXT = 'View its code by clicking the Settings button and pasting the Server URL into a new browser tab.'; | |
| const H3_2_TEXT = 'Explore this code and use it as a reference to create your own element.'; | |
| const DEBUG_TEXT = 'Loading the code for Custom Element \'wix-default-custom-element\'. To debug this code, open wixDefaultCustomElement.js in Developer Tools.'; | |
| const createImage = () => { | |
| const imageElement = document.createElement('img'); |